In [SOLVED]Torch.grid_sample? - #2 by ptrblck the grid
parameter of grid_sample
appears to have the y, x
order because grid = torch.stack((meshy, meshx), 2)
. But in the documentation, it says "the size-2 vector grid[n, h, w]
specifies input
pixel locations x
and y
". So is the grid order y, x
or x, y
? In other words, does grid[..., 0]
sample along the height or the width of the image?