×

签到

分享到微信

打开微信,使用扫一扫进入页面后,点击右上角菜单,

点击“发送给朋友”或“分享到朋友圈”完成分享

PyTorch框架的Yolov5移植教程​出现Invalid device number 已解决 xukefang2021-11-11 10:41:41 回复 5 查看 技术答疑 使用求助 比赛答疑
PyTorch框架的Yolov5移植教程​出现Invalid device number
分享到:

我在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

版权所有 © 2024 寒武纪 Cambricon.com 备案/许可证号:京ICP备17003415号-1
关闭