


dimension and [0, 1, 2, 3] for the innermost dimension, and function estimates
  >>> # partial derivative for both dimensions.
  >>> t = torch.tensor([[1, 2, 4, 8], [10, 20, 40, 80]])
  >>> torch.gradient(t)
  (tensor([[ 9., 18., 36., 72.],
           [ 9., 18., 36., 72.]]),
   tensor([[ 1.0000, 1.5000, 3.0000, 4.0000],
           [10.0000, 15.0000, 30.0000, 40.0000]]))




  >>> # A scalar value for spacing modifies the relationship between tensor indices
  >>> # and input coordinates by multiplying the indices to find the
  >>> # coordinates. For example, below the indices of the innermost
  >>> # 0, 1, 2, 3 translate to coordinates of [0, 2, 4, 6], and the indices of
  >>> # the outermost dimension 0, 1 translate to coordinates of [0, 2].
  >>> torch.gradient(t, spacing = 2.0) # dim = None (implicitly [0, 1])
  (tensor([[ 4.5000, 9.0000, 18.0000, 36.0000],
            [ 4.5000, 9.0000, 18.0000, 36.0000]]),
