piggyback
piggyback copied to clipboard
Missing average pool in modnets.vgg definition
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 )
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.
I guess AdaptiveAvgPool2d was not in the required versions:
torch==0.2.0.post3 torchvision==0.1.9;
it was newly added: https://github.com/pytorch/vision/pull/747
so I guess (with higher versions of pytorch) one can skip this when doing copy_.