# How to deal with different sized input images in CNNs
@jitsev1 :
Here historical overview over classical papers relevant for global pooling layer and network architectures where the technique to avoid flattening + FC layer was used in the beginnings. ResNet is also using this in most modern implementations. The approach is - no more flatten operation, global pooling layer (GlobalAveragePooling2D in Keras/TF, adaptive pooling in PyTorch) instead.
* Network In Network, 2013<br>
Min Lin, Qiang Chen, Shuicheng Yan<br>
https://arxiv.org/abs/1312.4400
* Striving for Simplicity: The All Convolutional Net, 2014<br>
Jost Tobias Springenberg, Alexey Dosovitskiy, Thomas Brox, Martin Riedmiller<br>
https://arxiv.org/pdf/1412.6806
* Going Deeper with Convolutions, 2014<br>
Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, Andrew Rabinovich<br>
https://arxiv.org/abs/1409.4842
* Excellent recent paper on applying such networks for training of robust models transferable across image scales, with clear background on global pooling operation:<br>
Mix & Match: training convnets with mixed image sizes for improved accuracy, speed and scale resiliency<br>
Elad Hoffer, Berry Weinstein, Itay Hubara, Tal Ben-Nun, Torsten Hoefler, Daniel Soudry<br>
"A lot of people mistakenly believe that convolutional neural networks (CNNs) can only work with one fixed image size, and that that must be rectangular. However, most libraries support “adaptive” or “global” pooling layers, which entirely avoid this limitation. It doesn’t help that some libraries (such as Pytorch) distribute models that do not use this feature – it means that unless users of these libraries replace those layers, they are stuck with just one image size and shape (generally 224x224 pixels). The fastai library automatically converts fixed-size models to *** dynamically sized models ***."<br>
(Meanwhile, it is a standard architectural feature in most state of the art network implementations and is of course not confined to fast.ai library)