In spatial transformers, we multiply grid coordinates with matrix to get new co-ordinates. So for example if size of image is 28*28. Then grid co-ordinates would be (x,y) where 0 $0 \leq x \leq 27$ and $0 \leq y \leq 27$. Then after multiplication we would get different co-ordinates which could be fractional. But output of affine grid seems to be always in 0,1. Does any how to interpret the output of affine grid and how it is used in conjunction in grid sample.