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,
, and the decomposition has the form:If upper is False, return a lower-triangular matrix,
, and the decomposition has the form: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.]]