2022-11-17 20:27:02 +08:00
|
|
|
|
mindspore.ops.Geqrf
|
|
|
|
|
|
===================
|
|
|
|
|
|
|
|
|
|
|
|
.. py:class:: mindspore.ops.Geqrf
|
|
|
|
|
|
|
2023-02-25 16:53:19 +08:00
|
|
|
|
将矩阵分解为正交矩阵 `Q` 和上三角矩阵 `R` 的乘积。该过程称为QR分解: :math:`A = QR` 。
|
2022-11-17 20:27:02 +08:00
|
|
|
|
|
2023-02-25 16:53:19 +08:00
|
|
|
|
`Q` 和 `R` 矩阵都存储在同一个输出Tensor `y` 中。 `R` 的元素存储在对角线及上方。隐式定义矩阵 `Q` 的基本反射器(或户主向量)存储在对角线下方。
|
|
|
|
|
|
|
|
|
|
|
|
此函数返回两个Tensor( `y`, `tau` )。
|
2022-11-17 20:27:02 +08:00
|
|
|
|
|
|
|
|
|
|
输入:
|
2022-11-23 17:58:15 +08:00
|
|
|
|
- **x** (Tensor) - shape为 :math:`(*, m, n)` ,输入矩阵维度必须为大于等于两维,支持dtype为float32、float64、complex64、complex128。
|
2022-11-17 20:27:02 +08:00
|
|
|
|
|
|
|
|
|
|
输出:
|
2022-11-23 17:58:15 +08:00
|
|
|
|
- **y** (Tensor) - shape为 :math:`(*, m, n)` ,与 `x` 具有相同的dtype。
|
|
|
|
|
|
- **tau** (Tensor) - shape为 :math:`(*, p,)` ,并且 :math:`p = min(m, n)` ,与 `x` 具有相同的dtype。
|
2022-11-17 20:27:02 +08:00
|
|
|
|
|
|
|
|
|
|
异常:
|
|
|
|
|
|
- **TypeError** - 如果 `x` 不是一个Tensor。
|
2022-11-23 17:58:15 +08:00
|
|
|
|
- **TypeError** - 如果 `x` 的dtype不是float32、float64、complex64、complex128中的一个。
|
|
|
|
|
|
- **ValueError** - 如果 `x` 的维度小于2。
|