I have tried torch.nn.AdaptiveAvgPool2d(output_size) as follow:
m = nn.AdaptiveAvgPool2d((4,1))
a=torch.randn(1, 64, 7, 9)
output = m(input)
then I got the following results:
Do anyone know how the function torch.nn.AdaptiveAvgPool2d(output_size) works? Or can someone tell me where I can find the source code of torch.nn.AdaptiveAvgPool2d(output_size)?