运行efficientdet-pytorch版的时候,出现以下错误:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
(eff) ubuntu@mcj:~/eff$ python efficientdet_test.py Traceback (most recent call last): File "efficientdet_test.py", line 77, in <module> threshold, iou_threshold) File "/home/ubuntu/eff/utils/utils.py", line 93, in postprocess anchors_nms_idx = nms(transformed_anchors_per, scores_per[:, 0], iou_threshold=iou_threshold) File "/home/ubuntu/anaconda3/envs/eff/lib/python3.6/site-packages/torchvision/ops/boxes.py", line 33, in nms return _C.nms(boxes, scores, iou_threshold) RuntimeError: CUDA error: no kernel image is available for execution on the device (nms_cuda at /tmp/pip-req-build-c2_g4c3l/torchvision/csrc/cuda/nms_cuda.cu:127) frame #0: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) + 0x6d (0x7ffbbee24e7d in /home/ubuntu/anaconda3/envs/eff/lib/python3.6/site-packages/torch/lib/libc10.so) frame #1: nms_cuda(at::Tensor const&, at::Tensor const&, float) + 0x8d1 (0x7ffb9554ae96 in /home/ubuntu/anaconda3/envs/eff/lib/python3.6/site-packages/torchvision/_C.so) frame #2: nms(at::Tensor const&, at::Tensor const&, float) + 0x183 (0x7ffb9550ee9f in /home/ubuntu/anaconda3/envs/eff/lib/python3.6/site-packages/torchvision/_C.so) frame #3: <unknown function> + 0x79cbd (0x7ffb95528cbd in /home/ubuntu/anaconda3/envs/eff/lib/python3.6/site-packages/torchvision/_C.so) frame #4: <unknown function> + 0x76578 (0x7ffb95525578 in /home/ubuntu/anaconda3/envs/eff/lib/python3.6/site-packages/torchvision/_C.so) frame #5: <unknown function> + 0x70ce6 (0x7ffb9551fce6 in /home/ubuntu/anaconda3/envs/eff/lib/python3.6/site-packages/torchvision/_C.so) frame #6: <unknown function> + 0x70f8a (0x7ffb9551ff8a in /home/ubuntu/anaconda3/envs/eff/lib/python3.6/site-packages/torchvision/_C.so) frame #7: <unknown function> + 0x5be18 (0x7ffb9550ae18 in /home/ubuntu/anaconda3/envs/eff/lib/python3.6/site-packages/torchvision/_C.so) <omitting python frames> frame #25: __libc_start_main + 0xe7 (0x7ffbeb884b97 in /lib/x86_64-linux-gnu/libc.so.6) |
解决方法:
- 对
cuda
进行降级,从10.x
降级为9.2
:conda install cudatoolkit=9.2
- 安装
torchvision0.5
:pip install torchvision==0.5
本文最后更新于2021年9月28日,已超过 1 年没有更新,如果文章内容或图片资源失效,请留言反馈,我们会及时处理,谢谢!
学习
遇到童同样的问题来学习下
@littlefisher 好的
学习
这个解决方案太重要
学习一下
前来学习一下
采坑了,前来学习
想看一下
学习一下,看看什么原因
真的有这个问题,想快点知道答案,谢谢
同样的问题,学习一下
遇到这个问题,特意来学习学习
学习
你好,这个nms报的错如果降级cuda到9.2,但是gpu算力是7.5要求cuda10 以上版本, 在使用nvcc编译nms的时候仍然不通过怎么解决呢
@111 可以只做第二条改变,关于cuda的不要动
学习
学习
我也遇到了这样情况
同样的问题,想看答案
同样的问题,头疼
学习
学习学习
学习一下
请教一下解决方法
同样问题很头疼
来看看
学些学习
看一下
遇到同样的问题
遇到统一的问题
我也遇到类似的问题,过来学习学习