Here the output shape indicates that every 5*14 grid is average to get this shape 2*2 ?
Am I right ?

Completely correct 
Also just noticed I linked to AvgPool2d rather than AdaptiveAvgPool2d: AdaptiveAvgPool2d — PyTorch 1.9.0 documentation. Sorry about that (just edited the reply)

The output size given in function only, which is required after avg pooling that’s it.

Exactly this, it’s the only argument we can specify! I’d imagine the stride is always 1 for the formulas mentioned above, i.e. every possible grid is used, like you said!