What is Adaptive average pooling and How does it work?
I recently came across a method in Pytorch when I try to implement AlexNet. 
I don't understand how it works. Please explain the idea behind it with some examples. And how it is different from Maxpooling or Average poling in terms of Neural Network functionality


  nn.AdaptiveAvgPool2d((6, 6))


In average-pooling or max-pooling, you essentially set the stride and kernel-size by your own, setting them as hyper-parameters. You will have to re-configure them if you happen to change your input size. 

In Adaptive Pooling on the other hand, we specify the output size instead. And the stride and kernel-size are automatically selected to adapt to the needs. The following equations are used to calculate the value in the source code.

Stride = (input_size//output_size)  
Kernel size = input_size - (output_size-1)*stride  
Padding = 0

