Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
@zhangjinchu

Description

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这种经典网络的参数啊。这到底是怎么回事呢?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /