mindspore.ops.cholesky ====================== .. image:: https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/br_base/resource/_static/logo_source.svg :target: https://gitee.com/mindspore/mindspore/blob/br_base/docs/api/api_python/ops/mindspore.ops.func_cholesky.rst :alt: 查看源文件 .. py:function:: mindspore.ops.cholesky(input_x, upper=False) 计算给定对称正定矩阵的Cholesky分解。 如果 `upper` 为True,则返回的矩阵 :math:`U` 为上三角矩阵,分解形式为: .. math:: A = U^TU 如果 `upper` 为False,则返回的矩阵 :math:`L` 为下三角矩阵,分解形式为: .. math:: A = LL^T 参数: - **input_x** (Tensor) - shape大小为 :math:`(*, N, N)` 的输入tensor, 公式中的 :math:`A` 。 - **upper** (bool,可选) - 是否返回上三角矩阵, 默认 ``False`` 。 返回: Tensor