Kernel size of max pooling

I want to maxpool2d over an input of shape 1x512x60x80, i.e. I want to end up with a tensor of shape 1x512x1x1. Is it correct to use

   x = torch::max_pool2d(x,{60, 80}); 

and to define the non-square kernel size with the initializer-list syntax?

thanks in advance

You can just use adaptativr max pooling

Are you referring to this ?

I am wondering why there is no error or exception caught, if I try to standard max pool over a rectangular input with a non-fitting square kernel…