F.avg_pool2d can not get the same result as F.adaptive_avg_pool2d when I trying to feed a same input and expecting the same output shape

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:
image
The outputs have the same shape, but there’s a minor difference between them. Is this normal?

You are most likely running into small numerical errors due to the limited floating point precision caused by e.g. a different order of operations in these layers.