How does `AdaptiveAvgPool2d` work for increasing the size?

Hello All,

I have a section in my network which needs constant size inputs and I have variable size data and therefore I am using adaptive avg pool2D. Mostly the image sized would get downscaled but there might be certain cases where image sizes go up let us say from (120, 120) to (160, 160). So how does the function takes care of such cases. I believe it would pad the image internally, so what is the kind of padding?. And Secondly, is upscaling like this advisable?