Do you want a random displacement field where the displacements follow a Gaussian distribution?
If so, what you need to do is generate a tensor with the displacements
disp_field = torch.FloatTensor(1,2,16,16).normal_(mean, std).requires_grad_()

Then add it into an identity grid, which you can create using affine_grid() 3:
id_grid = torch.nn.functional.affine_grid(torch.FloatTensor([[[1, 0, 0],[0, 1, 0]]]), size=(1,2,16,16))

and then pass the sum to grid_sample():
output = torch.nn.functional.grid_sample(input, id_grid + disp_field)

Just note that the mean and standard deviation will be in the grid units of a half-image (ie. a displacement of 1 will be equivalent to (size - 1)/2 pixels).
So if you have the mean and std in pixels, you have to divide them both by (size - 1)/2.
I hope this helps.