Hi boss. How to fix this?
Fusing layers...
Traceback (most recent call last):
File "/Users/anderson/Downloads/FPSAutomaticAiming-main/./Main.py", line 148, in
detections = detect(img) # 送入yolo检测
File "/Users/anderson/Downloads/FPSAutomaticAiming-main/CFDetect.py", line 44, in detect
pred = model(img, augment=False)[0]
File "/opt/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, kwargs)
File "/Users/anderson/Downloads/FPSAutomaticAiming-main/models/yolo.py", line 123, in forward
return self.forward_once(x, profile) # single-scale inference, train
File "/Users/anderson/Downloads/FPSAutomaticAiming-main/models/yolo.py", line 139, in forward_once
x = m(x) # run
File "/opt/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, *kwargs)
File "/Users/anderson/Downloads/FPSAutomaticAiming-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 "/opt/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(input, kwargs)
File "/Users/anderson/Downloads/FPSAutomaticAiming-main/models/common.py", line 45, in fuseforward
return self.act(self.conv(x))
File "/opt/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/opt/miniconda3/lib/python3.9/site-packages/torch/nn/modules/conv.py", line 443, in forward
return self._conv_forward(input, self.weight, self.bias)
File "/opt/miniconda3/lib/python3.9/site-packages/torch/nn/modules/conv.py", line 439, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,
RuntimeError: Given groups=1, weight of size [32, 12, 3, 3], expected input[1, 16, 320, 320] to have 12 channels, but got 16 channels instead
Hi boss. How to fix this? Fusing layers... Traceback (most recent call last): File "/Users/anderson/Downloads/FPSAutomaticAiming-main/./Main.py", line 148, in
detections = detect(img) # 送入yolo检测
File "/Users/anderson/Downloads/FPSAutomaticAiming-main/CFDetect.py", line 44, in detect
pred = model(img, augment=False)[0]
File "/opt/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, kwargs)
File "/Users/anderson/Downloads/FPSAutomaticAiming-main/models/yolo.py", line 123, in forward
return self.forward_once(x, profile) # single-scale inference, train
File "/Users/anderson/Downloads/FPSAutomaticAiming-main/models/yolo.py", line 139, in forward_once
x = m(x) # run
File "/opt/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, *kwargs)
File "/Users/anderson/Downloads/FPSAutomaticAiming-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 "/opt/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(input, kwargs)
File "/Users/anderson/Downloads/FPSAutomaticAiming-main/models/common.py", line 45, in fuseforward
return self.act(self.conv(x))
File "/opt/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/opt/miniconda3/lib/python3.9/site-packages/torch/nn/modules/conv.py", line 443, in forward
return self._conv_forward(input, self.weight, self.bias)
File "/opt/miniconda3/lib/python3.9/site-packages/torch/nn/modules/conv.py", line 439, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,
RuntimeError: Given groups=1, weight of size [32, 12, 3, 3], expected input[1, 16, 320, 320] to have 12 channels, but got 16 channels instead