vision icon indicating copy to clipboard operation
vision copied to clipboard

[enhancement] Replacement nn.AvgPool2d by nn.AdaptiveAvgPool

Open Nurfen opened this issue 8 years ago • 1 comments

Hello,

Thanks for creating the Resnet in pytorch. The network could be made more flexible towards different inputsizes when the avgpool2d layer is replaced by the AdaptiveAvgPool layer.

self.avgpool = nn.AvgPool2d(7, stride=1) could be replaced by

self.avgpool = nn.AdaptiveAvgPool2d(1)

Nurfen avatar Nov 05 '18 11:11 Nurfen

Hi,

This has been implemented in https://github.com/pytorch/vision/pull/643

Thanks for opening the issue!

fmassa avatar Nov 06 '18 09:11 fmassa