Skip to content

Adapted SqueezeNet for Variable Size Input Images #166

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

Closed
wants to merge 1 commit into from

Conversation

raunakdoesdev
Copy link

Replaced final AveragePooling layer with an AdaptiveAveragePooling layer to allow for no code changes when switching from 255x255 images to other image sizes.

Replaced final AveragePooling layer with an AdaptiveAveragePooling layer to allow for no code changes when switching from 255x255 images to other image sizes.
@fmassa
Copy link
Member

fmassa commented May 7, 2017

Thanks for the PR.
According to the discussion in #155 , it might be preferable to add a constructor argument to switch between both behaviors. What do you think?

@raunakdoesdev
Copy link
Author

raunakdoesdev commented May 8, 2017

The way I see it is, in the current code base any input image of a different size (bigger or smaller) causes the network to crash when run. When given an adaptive pool layer rather than fixed average pooling the network still runs as intended with 255x255 images for classification but also supports other image sizes with the same resultant behavior. I think in the case of other jobs such as segmentation (fully dense outputs), it should be up to the end user to make the necessary modifications since there are too many use cases to create arguments in the constructor for each case.

The change to Adaptive Pooling makes sense to me since it maintains the current functionality of the network, adds new functionality and doesn't introduce unneeded complexity for the user.

@fmassa
Copy link
Member

fmassa commented May 13, 2017

I'm ok to merge this as is. Do you have an idea on how the network performs for different image sizes?

@apaszke
Copy link
Contributor

apaszke commented May 13, 2017

If we're going to change this network shouldn't we change all other ones too? I'm not sure if it's a good idea. Replacing a single layer should be quite straightforward and is more explicit

@raunakdoesdev
Copy link
Author

raunakdoesdev commented May 13, 2017 via email

@chao1224
Copy link

chao1224 commented Jul 9, 2017

Just happend to face same problem. I think at least it would be reasonable to add some comments in the code.

@fmassa
Copy link
Member

fmassa commented Nov 6, 2018

This has been implemented in #643.

Thanks for the PR!

@fmassa fmassa closed this Nov 6, 2018
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.

4 participants