Okay–so i am posting part of the solution to my question just above here, as I have found it through some calculations and observing the results from F.grid_sample()
Let us say grid sample is working with the help of a grid which has, say,  dimensions 1x64x64x2. The final dimensions of the image is 64x64. Now, say we are “filling” up the final image with values coming from the initial image. The first pixel (0,0) will have value as img[grid[0,0,0],grid[0,0,1]] where img is the original image and grid is the grid being used. The rest of the pixels will have values in a similar fashion.
Now, an important thing is the grid is a float tensor, and, thus cant be used for indexing. So, my question here is, do we average the pixel values? Say when we have the grid pixel at (0,0,0) as 41.5, do we do ((img[41,y]+img[42,y])/2.0)  or not?–this method of pixel averaging somehow seems to be a crude approach, hence I am unsure.