My code in a network forward:
print(feat.shape)
atten = F.avg_pool2d(feat, feat.size()[2:])
lll = F.adaptive_avg_pool2d(feat, (1, 1))
print(atten.shape)
print(lll.shape)
print((atten-lll).max())
print((atten-lll).min())
And the result:
The outputs have the same shape, but there’s a minor difference between them. Is this normal?