-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPU版本完全没法跑啊,一个接一个的错误 #17
Comments
这套程序里,有的算法是基于pytorch框架运行的,有的是调用opencv运行的。在基于Pytorch框架运行的程序里,有device = 'cuda' if torch.cuda.is_available() else 'cpu'这行代码,它会根据运行设备自适应切换到cpu或者gpu环境的,而调用opencv的程序在cpu和gpu环境是通用的 |
嗯,检测到cuda可用,device是'cuda',可是跑不通啊,各种错误 |
比如pfld_mtcnn\detector.py报错如下:
|
这个错误的原因很简单呀,就是网络结构model转换到gpu环境了,但是输入张量Input没有转换到gpu环境,因此你需要在输入张量Input后加上.to(device) |
希望作者有空上传一下能跑通GPU的版本,感谢~
The text was updated successfully, but these errors were encountered: