@ptrblck  highlighted your question.
Say you pool width / height X to new width / height Y < X. Then is Y does not divide X, you’re in a bit of a pickle. The Adaptive pooling seems to implicitly “copy” some data in the middle. A less surprising alternative might be to pad the input to a multiple of X (“same” or “reflection” might be more intuitive than zeros), as those will then be part of the same pooling region. Or you could crop the edges off.
Best regards
Thomas