深度学习在没有CUDA的计算机上

huangapple go评论120阅读模式
英文:

Deep learning on a computer without CUDA

问题

深度学习(DNN)在OpenCV中。如果您为后端和目标指定了CUDA,即使计算机上没有安装CUDA,也可以运行。但在这种情况下,它运行的是什么设置?
另外,我找不到获取当前设置的方法,如果有人知道,请告诉我。

net->setPreferableBackend(cv::dnn::DNN_BACKEND_CUDA);
net->setPreferableTarget(cv::dnn::DNN_TARGET_CUDA);

有了这个设置,即使在没有CUDA的计算机上也可以执行深度学习。为什么呢?

英文:

Deep Learning (DNN) in opencv If you specify CUDA for backend and target, It works even if CUDA is not installed on the PC, but in this case, what settings are it running?
Also, I couldn't find a way to get the current settings, so if anyone knows please let me know.

net->setPreferableBackend(cv::dnn::DNN_BACKEND_CUDA); 
net->setPreferableTarget(cv::dnn::DNN_TARGET_CUDA);

With this setting, deep learning can be performed even on a computer without CUDA. why

答案1

得分: 0

Without CUDA, it falls back to the CPU backend, which is functionally the same but not as fast as the GPU.

参考
https://stackoverflow.com/questions/61095996/how-to-deal-with-dnn-module-was-not-built-with-cuda-backend-switching-to-CPU

英文:

Without CUDA it falls back to CPU back-end which is functionally same but not as fast as GPU.

Refer
https://stackoverflow.com/questions/61095996/how-to-deal-with-dnn-module-was-not-built-with-cuda-backend-switching-to-cpu

huangapple
  • 本文由 发表于 2023年3月7日 19:52:39
  • 转载请务必保留本文链接:https://go.coder-hub.com/75661644.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定