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

大佬如果改动使用MBConvBlock的se模块呢 设置True,会报错 #30

Closed
ahhhxxx opened this issue Dec 3, 2021 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@ahhhxxx
Copy link

ahhhxxx commented Dec 3, 2021

File "F:/999yolo/YOLOv5-Multibackbone-Compression-main/models/yolo.py", line 331, in
model = Model(opt.cfg).to(device)
File "F:/999yolo/YOLOv5-Multibackbone-Compression-main/models/yolo.py", line 112, in init
m.stride = torch.tensor([s / x.shape[-2] for x in self.forward(torch.zeros(1, ch, s, s))]) # forward
File "F:/999yolo/YOLOv5-Multibackbone-Compression-main/models/yolo.py", line 128, in forward
return self._forward_once(x, profile, visualize) # single-scale inference, train
File "F:/999yolo/YOLOv5-Multibackbone-Compression-main/models/yolo.py", line 152, in _forward_once
x = m(x) # run
File "D:\Anaconda3\envs\y55\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "F:\999yolo\YOLOv5-Multibackbone-Compression-main\models\common.py", line 142, in forward
x_squeezed = nn.AdaptiveAvgPool2d(x, 1)
TypeError: init() takes 2 positional arguments but 3 were given

@Gumpest Gumpest added the bug Something isn't working label Dec 6, 2021
@Gumpest
Copy link
Owner

Gumpest commented Dec 6, 2021

您好,我目前代码push出现问题,您可以将se模块替换成SeBlock类即可,亲测可用

@Gumpest
Copy link
Owner

Gumpest commented Dec 7, 2021

已修复,请git pull

@Gumpest Gumpest closed this as completed Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants