mindspore.ops.cholesky
- mindspore.ops.cholesky(input_x, upper=False)[source]
Return the Cholesky decomposition of zero or more batch dimensions consisting of symmetric positive-definite matrices.
If upper is True, return an upper-triangular matrix, \(U\), and the decomposition has the form:
\[A = U^TU\]If upper is False, return a lower-triangular matrix, \(L\), and the decomposition has the form:
\[A = LL^T\]where A is the symmetric positive-definite matrix.
- Parameters
- Returns
Tensor
- Supported Platforms:
GPU
CPU
Examples
>>> import mindspore >>> input_x = mindspore.tensor([[1.0, 1.0], [1.0, 2.0]]) >>> output = mindspore.ops.cholesky(input_x, upper=False) >>> print(output) [[1. 0.] [1. 1.]]