mindspore/docs/api/api_python/ops/mindspore.ops.func_cholesky...

31 lines
1.2 KiB
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.ops.cholesky
======================
.. py:function:: mindspore.ops.cholesky(input_x, upper=False)
计算对称正定矩阵 :math:`A` 或一批对称正定矩阵的Cholesky分解。
如果 `upper` 为True则返回的矩阵 :math:`U` 为上三角矩阵,分解形式为:
.. math::
A = U^TU
如果 `upper` 为False则返回的矩阵 :math:`L` 为下三角矩阵,分解形式为:
.. math::
A = LL^T
参数:
- **input_x** (Tensor) - shape大小为 :math:`(*, N, N)` ,其中 :math:`*` 是零个或多个由对称正定矩阵组成的批处理维数据类型为float32或float64。
- **upper** (bool) - 是否返回上三角矩阵还是下三角矩阵的标志。默认值False。
返回:
Tensorshape和数据类型与 `input_x` 相同。
异常:
- **TypeError** - 如果 `upper` 不是bool。
- **TypeError** - 如果 `input_x` 的数据类型既不是float32也不是float64。
- **TypeError** - 如果 `input_x` 不是Tensor。
- **ValueError** - 如果 `input_x` 不是一个或多个方阵。
- **ValueError** - 如果 `input_x` 不是对称正定矩阵。