In the below case, the input.shape is (5, 7) but target size is (7, 7). Accoding to the standard max pooling formula, the input size seems to be smaller than the target size if padding = 0.
I think there is a padding stage before the max_pooling operation, but how it work ?
Thanks for your help.
import torch
import torch.nn.functional as F

input = torch.rand((1, 3, 5, 7))
output = F.adaptive_max_pool2d(input, (7,7))