jchibane/ndf

Query about Boundary Points to Grid Points Transform

satyajitghana opened this issue · 1 comments

Hi,

what does the below line of code do?

grid_coords[:, 0], grid_coords[:, 2] = boundary_points[:, 2], boundary_points[:, 0]

the X's and Z's are being swapped, but why?

i figure it out, its because of this: https://pytorch.org/docs/stable/generated/torch.nn.functional.grid_sample.html
In the case of 5D inputs, grid[n, d, h, w] specifies the x, y, z pixel locations for interpolating output[n, :, d, h, w].