inverse(input:name:)
Computes the inverse of an input tensor.
Declaration
func inverse(input inputTensor: MPSGraphTensor, name: String?) -> MPSGraphTensorParameters
- inputTensor:
The input tensor.
- name:
The name for the operation.
Return Value
A valid MPSGraphTensor object containing the inverse of the input tensor.
Discussion
The framework computes the inverse of a square matrix by calling LU decomposition and LU solver. All dimensions after the first 2 are treated as batch dimensions and the inverse for each batch is computed. Results are undefined for ill conditioned matrices.