inv

abstract fun Tensor<T>.inv(): Tensor<T>

Computes the multiplicative inverse matrix of a square matrix input, or of each square matrix in a batched input. Given a square matrix A, return the matrix AInv satisfying A dot AInv == AInv dot A == eye(a.shape[0]). For more information: https://pytorch.org/docs/stable/linalg.html#torch.linalg.inv

Return

the multiplicative inverse of a matrix.

Sources

common source
Link copied to clipboard