运行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

马春杰杰


最新评论
站长您好,亚马逊云咨询推广资源,望建立联系,可邮件,谢谢。
换友情链接吗?
看你的站做的挺不错的
恭喜!!太强了,硕博连读啊
雁过留毛,人过留名。
看不懂但大受震撼
每天都在战争,希望2026和平.
ZeroTier 看过多篇帖子,目前群辉、飞牛os、win11 、安卓、ubuntu ≥18.04 顺利通过,这篇相对于简单 实用、特来感谢 🙄