python - Dlib 不在 Google Colab 上使用 GPU

标签 python google-colaboratory dlib

我如何在 GPU 上强制训练?

目前它只使用 CPU,即使我运行 dlib.DLIB_USE_CUDA 并且它显示 true

当我运行 print(dlib.cuda.get_num_devices()) 时,它还会显示 1

这是一张图片,显示了在我实际运行代码时 GPU 上没有运行任何东西:

enter image description here

注意: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/

相关文章:

python - 为什么 keras2onnx.convert_keras() 函数不断出现错误 "' KerasTensor 的对象没有属性 'graph'“

c++ - 如何在 C++ 中找到两个 vector 之间的最小(优化)距离

opencv - 训练对象检测器时图像类型是否重要?

python - Selenium - X 时间后刷新所有选项卡

python - 如何在 Python 中处理流式传输到 Firebase 信令服务器的视频

python - 使用 Google Colab 的 TensorFlow 1 中的 TensorBoard

python - 设置 TensorBoard 以在 Google Colab 中为 TensorFlow 对象检测模型运行 eval.py 作业

python - 没有名为 'apscheduler' 的模块

python - OneToOne 和 Django 中的模型子类化有什么区别

opencv - FDDB评估代码