File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, *kwargs)
File "/ssd/yangyuqian/projects/data_management/infer_upload/models/yolo.py", line 126, in forward
return self._forward_once(x, profile, visualize) # single-scale inference, train
File "/ssd/yangyuqian/projects/data_management/infer_upload/models/yolo.py", line 149, in _forward_once
x = m(x) # run
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(input, **kwargs)
File "/ssd/yangyuqian/projects/data_management/infer_upload/models/common.py", line 208, in forward
return self.conv(torch.cat([x[..., ::2, ::2], x[..., 1::2, ::2], x[..., ::2, 1::2], x[..., 1::2, 1::2]], 1))
RuntimeError: Sizes of tensors must match except in dimension 3. Got 1 and 2 (The offending index is 0)
解決:
檢查圖片預(yù)處理棚品,letterbox后處理沒加進(jìn)去