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

[enhancement] Replacement nn.AvgPool2d by nn.AdaptiveAvgPool #654

Closed
Nurfen opened this issue Nov 5, 2018 · 1 comment
Closed

[enhancement] Replacement nn.AvgPool2d by nn.AdaptiveAvgPool #654

Nurfen opened this issue Nov 5, 2018 · 1 comment

Comments

@Nurfen
Copy link

Nurfen commented Nov 5, 2018

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)

@fmassa
Copy link
Member

fmassa commented Nov 6, 2018

Hi,

This has been implemented in #643

Thanks for opening the issue!

@fmassa fmassa closed this as completed Nov 6, 2018
rajveerb pushed a commit to rajveerb/vision that referenced this issue Nov 30, 2023
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

2 participants