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
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