我如何在 GPU 上强制训练?
目前它只使用 CPU,即使我运行 dlib.DLIB_USE_CUDA
并且它显示 true
。
当我运行 print(dlib.cuda.get_num_devices())
时,它还会显示 1
这是一张图片,显示了在我实际运行代码时 GPU 上没有运行任何东西:
注意:GPU 设置为 RUn
最佳答案
评论:
Apparently as what I've tested this wasn't a training error but rather it is loading error. It takes so much time and ram to load ibug-300W files. Is there any way to load this faster?
如果有人在 google colab(训练时间慢)上偶然发现了这个问题。
加载速度更快的方法是将数据集直接传输到 colab 的 vm/content 上。因为 Drive 和 Colab 之间的传输速度很慢。
PS:您至少需要 14-15GB 的内存才能加载 ibug-300W 文件。
关于python - Dlib 不在 Google Colab 上使用 GPU,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63411136/