打开微信,使用扫一扫进入页面后,点击右上角菜单,
点击“发送给朋友”或“分享到朋友圈”完成分享
我在移植yolov5时大算子报错如下:
Traceback (most recent call last):
File "fuse_batch.py", line 403, in <module>
detect()
File "fuse_batch.py", line 162, in detect
model = attempt_load(weights, map_location=device) # load FP32 model
File "/data/xyy/yolov5-v4/yolov5_seg_val/models/experimental.py", line 139, in attempt_load
model = Model('./models/yolov5s_city_seg.yaml')
File "/data/xyy/yolov5-v4/yolov5_seg_val/models/yolo.py", line 299, in __init__
m.stride = torch.tensor([s / x.shape[-2] for x in self.forward(torch.zeros(2, ch, s, s))[0]]) # forward
File "/data/xyy/yolov5-v4/yolov5_seg_val/models/yolo.py", line 329, in forward
return self.forward_once(x, profile) # single-scale inference, train
File "/data/xyy/yolov5-v4/yolov5_seg_val/models/yolo.py", line 348, in forward_once
x = m(x) # run
File "/root/anaconda3/envs/torch_mlu_py36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in __call__
result = self.forward(*input, **kwargs)
File "/data/xyy/yolov5-v4/yolov5_seg_val/models/yolo.py", line 232, in forward
self.maxBoxNum
RuntimeError: Didn't find kernel to dispatch to for operator 'torch_mlu::yolov5_detection_output'. Tried to look up kernel for dispatch key 'CPUTensorId'. Registered dispatch keys are: [MLUTensorId] (lookup_ at /pytorch/aten/src/ATen/core/dispatch/DispatchTable.h:249)
#0: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) + 0x57 (0x7f58a321f237 in /root/anaconda3/envs/torch_mlu_py36/lib/python3.6/site-packages/torch/lib/libc10.so)
#1: <unknown function> + 0xa9dfe6 (0x7f569f089fe6 in /root/anaconda3/envs/torch_mlu_py36/lib/python3.6/site-packages/torch/lib/libtorch.so)
#2: <unknown function> + 0x2d2af45 (0x7f56a1316f45 in /root/anaconda3/envs/torch_mlu_py36/lib/python3.6/site-packages/torch/lib/libtorch.so)
#3: <unknown function> + 0x4a171d (0x7f574f24f71d in /root/anaconda3/envs/torch_mlu_py36/lib/python3.6/site-packages/torch/lib/libtorch_python.so)
#4: <unknown function> + 0x471d45 (0x7f574f21fd45 in /root/anaconda3/envs/torch_mlu_py36/lib/python3.6/site-packages/torch/lib/libtorch_python.so)
#5: <unknown function> + 0x1dce3a (0x7f574ef8ae3a in /root/anaconda3/envs/torch_mlu_py36/lib/python3.6/site-packages/torch/lib/libtorch_python.so)
<omitting python s>
#48: __libc_start_main + 0xf0 (0x7f58c8fd5840 in /lib/x86_64-linux-gnu/libc.so.6)
请问如何解决?提前感谢
热门帖子
精华帖子