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

MultiSEAM加到yolov7中报错 #32

Open
gitdjz opened this issue Apr 4, 2023 · 1 comment
Open

MultiSEAM加到yolov7中报错 #32

gitdjz opened this issue Apr 4, 2023 · 1 comment

Comments

@gitdjz
Copy link

gitdjz commented Apr 4, 2023

大佬,这是咋回事啊?
Traceback (most recent call last):
File "D:\PycharmProjects\yolov7\models\yolo.py", line 892, in
model = Model(opt.cfg).to(device)
File "D:\PycharmProjects\yolov7\models\yolo.py", line 547, in init
m.stride = torch.tensor([s / x.shape[-2] for x in self.forward(torch.zeros(1, ch, s, s))]) # forward
File "D:\PycharmProjects\yolov7\models\yolo.py", line 602, in forward
return self.forward_once(x, profile) # single-scale inference, train
File "D:\PycharmProjects\yolov7\models\yolo.py", line 628, in forward_once
x = m(x) # run
File "D:\condaenv\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "D:\PycharmProjects\yolov7\models\common.py", line 3033, in forward
y0 = self.DCovN0(x)
File "D:\condaenv\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "D:\condaenv\pytorch\lib\site-packages\torch\nn\modules\container.py", line 141, in forward
input = module(input)
File "D:\condaenv\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "D:\condaenv\pytorch\lib\site-packages\torch\nn\modules\batchnorm.py", line 168, in forward
return F.batch_norm(
File "D:\condaenv\pytorch\lib\site-packages\torch\nn\functional.py", line 2419, in batch_norm
_verify_batch_size(input.size())
File "D:\condaenv\pytorch\lib\site-packages\torch\nn\functional.py", line 2387, in _verify_batch_size
raise ValueError("Expected more than 1 value per channel when training, got input size {}".format(size))
ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1, 256, 1, 1])

@liiicon
Copy link

liiicon commented Nov 20, 2023

请问你解决了嘛

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

2 participants