mindspore/docs/api/api_python/ops/mindspore.ops.Qr.rst

27 lines
1.3 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.Qr
=================
.. py:class:: mindspore.ops.Qr(full_matrices=False)
返回一个或多个矩阵的QR正交三角分解。如果 `full_matrices` 设为 ``True`` 则计算全尺寸q和r如果为 ``False`` 默认值则计算q的P列其中P是 `x` 的2个最内层维度中的最小值。
.. warning::
这是一个实验性API后续可能修改或删除。
参数:
- **full_matrices** (bool可选) - 是否进行全尺寸的QR分解。默认值 ``False``
输入:
- **x** (Tensor) - 要进行分解的矩阵。矩阵必须至少为二维。数据类型float16、float32、float64、complex64、complex128。
`x` 的shape定义为 :math:`(..., m, n)` p定义为m和n的最小值。
输出:
- **q** (Tensor) - `x` 的正交矩阵。如果 `full_matrices```True``则shape为 :math:`(m, m)` 否则shape为 :math:`(m, p)``q` 的数据类型与 `x` 相同。
- **r** (Tensor) - `x` 的上三角形矩阵。如果 `full_matrices```True``则shape为 :math:`(m, n)` 否则shape为 :math:`(p, n)``r` 的数据类型与 `x` 相同。
异常:
- **TypeError** - `x` 不是Tensor。
- **TypeError** - `full_matrices` 不是bool。
- **ValueError** - `x` 的维度小于2。