torch.linalg.inv
torch.linalg.inv(A, *, out=None) -> Tensor
Computes the inverse of a square matrix if it exists. Throws a
   RuntimeError if the matrix is not invertible.
Letting \mathbb{K} be \mathbb{R} or \mathbb{C}, for a matrix A \in
   \mathbb{K}^{n \times n}, its inverse matrix A^{-1} \in
   \mathbb{K}^{n \times n} (if it exists) is defined as
  A^{-1}A = AA^{-1} = \mathrm{I}_n

where \mathrm{I}_n is the n-dimensional identity matrix.
The inverse matrix exists if and only if A is invertible. In this
   case, the inverse is unique.
Supports input of float, double, cfloat and cdouble dtypes. Also
   supports batches of matrices, and if "A" is a batch of matrices
   then the output has the same batch dimensions.
Note:
 When inputs are on a CUDA device, this function synchronizes that
 device with the CPU.

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