Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
darkredrock opened this issue Aug 30, 2022 · 2 comments
Closed

Comments

@darkredrock
Copy link

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
Copy link
Owner

iscyy commented Aug 31, 2022

You should update the latest code

@iscyy iscyy closed this as completed Sep 4, 2022
@Leondre1
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants