-
Notifications
You must be signed in to change notification settings - Fork 762
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
【Hackathon 5th No.37】为 Paddle 新增 householder_product API (#6334)
* add householder_product_cn doc * doc style
- Loading branch information
Showing
2 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
.. _cn_api_paddle_linalg_householder_product: | ||
|
||
householder_product | ||
------------------------------- | ||
|
||
.. py:function:: paddle.linalg.householder_product(x, tau, name=None) | ||
计算 Householder 矩阵乘积的前 n 列(输入矩阵为 `[*,m,n]` )。 | ||
|
||
|
||
该函数可以从矩阵 `x` (m x n) 得到向量 :math:`\omega_{i}`,其中前 `i-1` 个元素为零,第 i 个元素为 `1`,其余元素元素来自 `x` 的第 i 列。 | ||
并且使用向量 `tau` 可以计算 Householder 矩阵乘积的前 n 列。 | ||
|
||
.. math:: | ||
H_i = I_m - \tau_i \omega_i \omega_i^H | ||
参数 | ||
:::::::::::: | ||
|
||
- **x** (Tensor): 形状为 `(*, m, n)` 的张量,其中 * 是零个或多个批量维度。 | ||
- **tau** (Tensor): 形状为 `(*, k)` 的张量,其中 * 是零个或多个批量维度。 | ||
- **name** (str, 可选): 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。 | ||
|
||
|
||
返回 | ||
:::::::::::: | ||
|
||
- Tensor, dtype 与输入张量相同, QR 分解中的 Q, :MATH:`out = q = H_1H_2H_3 ... H_K` | ||
|
||
代码示例 | ||
:::::::::: | ||
|
||
COPY-FROM: paddle.linalg.householder_product |