打开微信,使用扫一扫进入页面后,点击右上角菜单,
点击“发送给朋友”或“分享到朋友圈”完成分享
我在WSL2上使用docker(ubuntu18.04_sdk_v1.7.0_pytorch_v0.15.0-2)环境操作【PyTorch框架的Yolov5移植教程】时,
在推理量化后yolov5s_int8.pt的时,报错,有没有什么建议?
Traceback (most recent call last):
File "detect.py", line 119, in <module>
quantized_net.to(ct.mlu_device())
File "/torch/venv3/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 426, in to
return self._apply(convert)
File "/torch/venv3/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 202, in _apply
module._apply(fn)
File "/torch/venv3/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 202, in _apply
module._apply(fn)
File "/torch/venv3/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 202, in _apply
module._apply(fn)
[Previous line repeated 1 more time]
File "/torch/venv3/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 224, in _apply
param_applied = fn(param)
File "/torch/venv3/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 424, in convert
return t.to(device, dtype if t.is_floating_point() else None, non_blocking)
RuntimeError: Invalid device number
热门帖子
精华帖子