iscyy / yoloair

🔥🔥🔥 专注于YOLOv5,YOLOv7、YOLOv8、YOLOv9改进模型,Support to improve backbone, neck, head, loss, IoU, NMS and other modules🚀
https://github.com/iscyy/yoloair
GNU General Public License v3.0
2.51k stars 430 forks source link

你好,最新版的yoloair在训练acmix的时候报如下错误 #34

Closed darkredrock closed 2 years ago

darkredrock commented 2 years ago

Traceback (most recent call last): File "E:\code\yolov5\yoloair-main\train.py", line 690, in main(opt) File "E:\code\yolov5\yoloair-main\train.py", line 586, in main train(opt.hyp, opt, device, callbacks) File "E:\code\yolov5\yoloair-main\train.py", line 125, in train model = Model(cfg or ckpt['model'].yaml, ch=3, nc=nc, anchors=hyp.get('anchors')).to(device) # create File "E:\code\yolov5\yoloair-main\models\yolo.py", line 132, in init m.stride = torch.tensor([s / x.shape[-2] for x in self.forward(torch.zeros(1, ch, s, s))]) # forward File "E:\code\yolov5\yoloair-main\models\yolo.py", line 165, in forward return self._forward_once(x, profile, visualize) # single-scale inference, train File "E:\code\yolov5\yoloair-main\models\yolo.py", line 188, in _forward_once x = m(x) # run File "D:\Program Files\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1102, in _call_impl return forward_call(*input, kwargs) File "E:\code\yolov5\yoloair-main\models\common.py", line 850, in forward unfold_k = self.unfold(self.pad_att(k_att)).view(b self.head, self.head_dim, File "D:\Program Files\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1102, in _call_impl return forward_call(input, kwargs) File "D:\Program Files\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\padding.py", line 174, in forward return F.pad(input, self.padding, 'reflect') File "D:\Program Files\anaconda3\envs\pytorch\lib\site-packages\torch\nn\functional.py", line 4189, in _pad return torch._C._nn.reflection_pad2d(input, pad) RuntimeError: Argument #4: Padding size should be less than the corresponding input dimension, but got: padding (256, 256) at dimension 3 of input 4

iscyy commented 2 years ago

You should update the latest code

Leondre1 commented 2 years ago

Please,how to solve this problem? I have the same problem.