-
Notifications
You must be signed in to change notification settings - Fork 466
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
cudaCheckError() failed : invalid device function #2
Comments
Is there any other error message like the line number for me to find the reason. |
你是中国人,我说中文吧,就这两行输出。。我跑其他的模型的时候没有出错的 |
可能是RoIPool 的问题吧,你试试用python实现的RoIPool 能不能跑,在 from roi_pooling.modules.roi_pool_py import RoIPool
# from roi_pooling.modules.roi_pool import RoIPool |
果然是这个原因。。搞好了,不过速度非常慢啊。。一张图片4秒钟 |
是的,python实现的RoIPool需要2,3秒。 if not features.is_cuda:
_features = features.permute(0, 2, 3, 1)
roi_pooling.roi_pooling_forward(self.pooled_height, self.pooled_width, self.spatial_scale,
_features, rois, output)
# output = output.cuda() 改成: if True:
is_cuda = features.is_cuda
_features = features.permute(0, 2, 3, 1)
if is_cuda:
_features = _features.cpu()
rois = rois.cpu()
roi_pooling.roi_pooling_forward(self.pooled_height, self.pooled_width, self.spatial_scale,
_features, rois, output)
if is_cuda:
output = output.cuda() |
GPU是Tesla K40m,cuda是7.5 |
我这里连续跑VOC07的测试集是每帧 0.12s 左右,cpu的RoIPool 只比gpu 慢一点。
你可以试试按照他说的在 |
我也是刚开始用pytorch,一起交流哈~ |
好的 |
对于其它GPU:
Credit to https://github.com/mldbai/mldb/blob/master/ext/tensorflow.mk |
hi,可以带我一个吗,pytorch新手,跑过mxnet,tf等 |
when i run the demo.py, i met this error:
"load model successfully!
cudaCheckError() failed : invalid device function"
do you know why?
i can use pytorch to train other models, so the installation is correct.
thanks
The text was updated successfully, but these errors were encountered: