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

Missing average pool in modnets.vgg definition #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ankitk28
Copy link

@ankitk28 ankitk28 commented May 2, 2019

I think vgg16 definition is missing average pool before classifier (I got error in weight copying step between pretrained vgg to modnets.vgg which I traced back to this )

ankitk28 added 2 commits May 2, 2019 02:47
I think vgg16 definition is missing average pool before classifiers (I got error in weight copying step between pretrained vgg to modnet vgg) which I traced back to this )
@arunmallya
Copy link
Owner

Avg pool does not have any weights, so I am not sure what error you're getting.
The original VGG-16 definition does not have pooling as it only expects an input of size 224 x 224. If you are going to use a larger input, then you have to introduce an adaptive pooling of size 7x7 to match the expected output size of the last conv into fc6.

@joemzhao
Copy link

joemzhao commented Jan 2, 2020

I guess AdaptiveAvgPool2d was not in the required versions:

torch==0.2.0.post3
torchvision==0.1.9;

it was newly added:
pytorch/vision#747

so I guess (with higher versions of pytorch) one can skip this when doing copy_.

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

Successfully merging this pull request may close these issues.

3 participants