mindspore.ops.cholesky_solve
- mindspore.ops.cholesky_solve(input, input2, upper=False)[source]
Computes the solution of a set of linear equations with a positive definite matrix, according to its Cholesky decomposition factor input2 .
If upper is set to
True
and input2 is upper triangular, the output tensor is that:If upper is set to
False
and input2 is lower triangular, the output is that:Warning
This is an experimental API that is subject to change or deletion.
- Parameters
- Returns
Tensor
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> import mindspore >>> input1 = mindspore.tensor([[1., 0., 0.], [0., 1., 0.], [0., 0., 1.]]) >>> input2 = mindspore.tensor([[2., 0., 0.], [4., 1., 0.], [-1., 1., 2.]]) >>> out = mindspore.ops.cholesky_solve(input1, input2, upper=False) >>> print(out) [[ 5.8125 -2.625 0.625 ] [-2.625 1.25 -0.25 ] [ 0.625 -0.25 0.25 ]]