Hi,
I get NaNs when I run my training in Mixed precision training mode.
I have pointed the error at the following place
torch.nn.functional.grid_sample(input, grid, padding_mode="zeros",
                    mode='bilinear',
                    align_corners=True,)

when I change the sampling mode to nearest, it does not happen anymore.
torch.nn.functional.grid_sample(input, grid, padding_mode="zeros",
                    mode='nearest',
                    align_corners=True,)

both sampling modes work fine in 32 bit training.
My inputs and the grid does not contain NaNs or Infs , what could be the possible reason for this and the solution.