What do you mean by flow-field?
>>> output = F.grid_sample(input, flow-field)
According to doc:

input (Variable) – input batch of images (N x C x IH x IW)
grid (Variable) – flow-field of size (N x OH x OW x 2)

Why does flow-field have size (N x OH x OW x 2)?
Does the output of grid_sample 66 have same size as input?