Lv-Aige 2023-05-27 00:09 采纳率: 0%
浏览 38
已结题

RuntimeError: "slow_conv2d_cpu" not implemented for 'Half'

YOLOv5+DeepSORT目标识别跟踪项目
运行报错:RuntimeError: "slow_conv2d_cpu" not implemented for 'Half'
网上搜到是无卡运行不能用GPU函数的原因 但是找不到half()函数 不知如何修改
完整报错如下:
(venv) C:\Users\86183\Desktop\Yolov5-Deepsort-main\Yolov5-Deepsort-main>python demo.py
fps: 25
Traceback (most recent call last):
File "C:\Users\86183\Desktop\Yolov5-Deepsort-main\Yolov5-Deepsort-main\demo.py", line 55, in
main()
File "C:\Users\86183\Desktop\Yolov5-Deepsort-main\Yolov5-Deepsort-main\demo.py", line 27, in main
result = det.feedCap(im)
^^^^^^^^^^^^^^^
File "C:\Users\86183\Desktop\Yolov5-Deepsort-main\Yolov5-Deepsort-main\utils\BaseDetector.py", line 35, in feedCap
im, faces, face_bboxes = update_tracker(self, im)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\86183\Desktop\Yolov5-Deepsort-main\Yolov5-Deepsort-main\tracker.py", line 40, in update_tracker
_, bboxes = target_detector.detect(image)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\86183\Desktop\Yolov5-Deepsort-main\Yolov5-Deepsort-main\AIDetector_pytorch.py", line 47, in detect
pred = self.m(img, augment=False)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\86183\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\86183\Desktop\Yolov5-Deepsort-main\Yolov5-Deepsort-main\models\yolo.py", line 117, in forward
return self.forward_once(x, profile) # single-scale inference, train
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\86183\Desktop\Yolov5-Deepsort-main\Yolov5-Deepsort-main\models\yolo.py", line 148, in forward_once
x = m(x) # run
^^^^
File "C:\Users\86183\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\86183\Desktop\Yolov5-Deepsort-main\Yolov5-Deepsort-main\models\common.py", line 171, in forward
return self.conv(torch.cat([x[..., ::2, ::2], x[..., 1::2, ::2], x[..., ::2, 1::2], x[..., 1::2, 1::2]], 1))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\86183\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\86183\Desktop\Yolov5-Deepsort-main\Yolov5-Deepsort-main\models\common.py", line 45, in fuseforward
return self.act(self.conv(x))
^^^^^^^^^^^^
File "C:\Users\86183\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\86183\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\torch\nn\modules\conv.py", line 463, in forward
return self._conv_forward(input, self.weight, self.bias)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\86183\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\torch\nn\modules\conv.py", line 459, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: "slow_conv2d_cpu" not implemented for 'Half'

  • 写回答

6条回答 默认 最新

      报告相同问题?

      相关推荐 更多相似问题

      问题事件

      • 系统已结题 6月4日
      • 创建了问题 5月27日

      悬赏问题

      • ¥100 支付宝sdk原生链接转h5
      • ¥20 VS2019如何添加.mdf文件失败
      • ¥15 SeaTunnel多Transform配置问题
      • ¥15 消除字符串,求最短字符串长度
      • ¥20 有人做基于集员滤波的异常值处理相关的内容吗?(语言-matlab)
      • ¥30 matlab编程,用chatGPT帮助,但给出的code总是报错。
      • ¥15 离线安装VS2017出现报错
      • ¥50 opengl2怎么将梯形的纹理映射在矩形上面不变形
      • ¥15 起终点不同的tsp旅行商问题
      • ¥15 博途V16变频器CU320-2pn版本为2.34的gsd文件