@ptrblck  thanks for the kind feedback.
Actually on investigation Grid infact does have the inf as maximum value, sorry for the incorrect information above.
Then does it have undefined behavior or the following still applies according to the documentation ?
If grid has values outside the range of [-1, 1], the corresponding outputs are handled as defined by padding_mode. Options are .... 

input size: torch.Size([1, 32, 124, 384])
input min , max: 0.0,15.419422149658203
Grid size: torch.Size([1, 16, 200, 2])
Grid min, max: -0.9350162744522095,inf

and what could be done in this case
will it be valid to do following
grid[grid[..., :] > 1.0] = 2.0