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

关于cat vs dog中的维度问题 #43

Open
IIIgnac opened this issue May 13, 2022 · 0 comments
Open

关于cat vs dog中的维度问题 #43

IIIgnac opened this issue May 13, 2022 · 0 comments

Comments

@IIIgnac
Copy link

IIIgnac commented May 13, 2022

net.py文件中的这段:
vgg = models.vgg19(pretrained=True)
self.feature = nn.Sequential(*list(vgg.children())[:-1])
self.feature.add_module('global average', nn.AvgPool2d(9))

前两行代码的输出尺寸是7*7,而第三行平均池化的卷积核是9,运行后会出现这样的错误:Given input size: (512x7x7). Calculated output size: (512x0x0). Output size is too small

我的pytorch版本是1.6,是不是版本的问题?但按理说,Pytorch版本的迭代不会影响VGG这种经典网络的参数啊。这到底是怎么回事呢?

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

1 participant