torch.linalg.tensorinv
torch.linalg.tensorinv(A, ind=2, *, out=None) -> Tensor
Computes the multiplicative inverse of "torch.tensordot()".
If m is the product of the first "ind" dimensions of "A" and n
   is the product of the rest of the dimensions, this function expects
   m and n to be equal. If this is the case, it computes a tensor
   X such that tensordot("A", X, "ind") is the identity matrix
   in dimension m. X will have the shape of "A" but with the first
   "ind" dimensions pushed back to the end
  X.shape == A.shape[ind:] + A.shape[:ind]

Supports input of float, double, cfloat and cdouble dtypes.
Note:
 When "A" is a *2*-dimensional tensor and "ind"*= 1*, this
 function computes the (multiplicative) inverse of "A" (see
 "torch.linalg.inv()").

Note:
 Consider using "torch.linalg.tensorsolve()" if possible for
 multiplying a tensor on the left by the tensor inverse, as:
