Skip to content

Conversation

quinwu
Copy link
Contributor

@quinwu quinwu commented Nov 27, 2018

Hi,

I'm use DenseNet find densenet use avg_pool2d instead adaptive_avg_pool2d. That same problem has fixed in SqueezeNet and ResNet #643 . so I made this change.

F.avg_pool2d -> F.adaptive_avg_pool2d((1,1)) assures the output's size like (batch_size, num_classes, 1,1) on DenseNet.

@quinwu quinwu closed this Nov 27, 2018
@quinwu quinwu reopened this Nov 27, 2018
Copy link
Member

@fmassa fmassa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@fmassa fmassa merged commit d563769 into pytorch:master Nov 27, 2018
fmassa pushed a commit that referenced this pull request Feb 14, 2019
The update allows Alexnet to process images larger or smaller than prescribed imagenet size using adaptive average pooling. Will be useful while finetuning or testing on different resolution images. Similar to #643 and #672. I did not include adaptive avg pool in features or classifier block so that these predefined blocks can be used as it is.
fmassa pushed a commit that referenced this pull request Feb 14, 2019
The update allows VGG to process images larger or smaller than prescribed imagenet size using adaptive average pooling. Will be useful while finetuning or testing on different resolution images. Similar to #643 and #672. I did not include adaptive avg pool in features or classifier block so that these predefined blocks can be used as it is.
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.

2 participants