Open 58213 opened 3 years ago
cause:The pytorch conv CPU does not support fp16
solution: Change. Half() to. Float() in utils/general.py
520 line x['model'].float()#half() # to FP16
I have the same problem as user 58213, but change
520 line x ['model']. Float () # half () # to FP16
but the error persists
it doesn't work
The same error persists
它不起作用
你解决了吗
它不起作用
你解决了吗
可以把他这个项目里边的模型和权重换成最新的yolov5 6.1版本,models 和 utils 文件夹删除替换就行,权重换成对应版本的权重,详细的操作流程记不清了,但是这么操作最后解决了问题
它不起作用
你解决了吗
可以把他这个项目里边的模型和权重换成最新的yolov5 6.1版本,models 和 utils 文件夹删除替换就行,权重换成对应版本的权重,详细的操作流程记不清了,但是这么操作最后解决了问题
我换了,但是没有用T_T
我将utils/general.py和detector.py文件里所有的half都换成float就可以运行了
我也报了这个错误,原因是我电脑用的CPU,把module.py里的两个half()方法改成float()就可以解决了
报这个错呀 RuntimeError: "unfolded2d_copy" not implemented for 'Half' 请问修改哪个文件
/root/deep_sort/utils/parser.py:23: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. self.update(yaml.load(fo.read())) /root/venv/lib/python3.6/site-packages/torch/cuda/init.py:52: UserWarning: CUDA initialization: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx (Triggered internally at /pytorch/c10/cuda/CUDAFunctions.cpp:100.) return torch._C._cuda_getDeviceCount() > 0 Fusing layers... Traceback (most recent call last): File "main.py", line 79, in
bboxes = detector.detect(im)
File "/root/detector.py", line 47, in detect
pred = self.m(img, augment=False)[0]
File "/root/venv/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, kwargs)
File "/root/models/yolo.py", line 123, in forward
return self.forward_once(x, profile) # single-scale inference, train
File "/root/models/yolo.py", line 139, in forward_once
x = m(x) # run
File "/root/venv/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, *kwargs)
File "/root/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 "/root/venv/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(input, kwargs)
File "/root/models/common.py", line 45, in fuseforward
return self.act(self.conv(x))
File "/root/venv/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/root/venv/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 423, in forward
return self._conv_forward(input, self.weight)
File "/root/venv/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 420, in _conv_forward
self.padding, self.dilation, self.groups)
RuntimeError: "unfolded2d_copy" not implemented for 'Half'