Is there any efficient way to compute forward  (f_i+1,j - f_i,j ) or backward (f_i,j - f_i-1,j )  differences on the tensor, for example, x = torch.rand(Bs, Nc ,Nx, Ny), where Bs - batch size, Nc-number of channels, Nx, Ny - dimensions in X and Y direction?