-
Notifications
You must be signed in to change notification settings - Fork 765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API improvement for paddle.svd_lowrank 易用性提升 #6562
Conversation
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-6562.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
| niter | - | 表示子空间进行迭代的数量。Paddle 无此参数,暂无转写方式。 | | ||
| M | - | 表示输入 Tensor 的平均 size。 Paddle 无此参数,暂无转写方式。 | | ||
| - | full_matrics | 表示是否计算完整的 U 和 V 矩阵。 PyTorch 无此参数,Paddle 保持默认即可。 | | ||
| q | q | 表示输入 Tensor 略高估计秩,PyTorch 为 6,Paddle 为 None,Paddle 需设置为与 PyTorch 一致。 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
底层是一致的
@@ -20,6 +20,7 @@ pca_lowrank | |||
- **x** (Tensor) - 输入的需要进行线性主成分分析的一个或一批方阵,类型为 Tensor。 ``x`` 的形状应为 ``[*, M, N]``,其中 ``*`` 为零或更大的批次维度,数据类型支持 float32, float64。 | |||
- **q** (int,可选) - 对输入 :math:`X` 的秩稍微高估的预估值,默认值是 :math:`q=min(6,N,M)`。 | |||
- **center** (bool,可选) - 是否对输入矩阵进行中心化操作,类型为 bool ,默认为 True。 | |||
- **niter** (int) - 需要进行的子空间迭代次数。默认值为 2。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
torch.pca_lowrank
的差异对比文档是不是也有问题?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
torch.pca_lowrank的差异对比文档里面写了niter,没有问题
:::::::::::: | ||
|
||
- **x** (Tensor) - 输入的需要进行奇异值分解的一个或一批方阵,类型为 Tensor。 ``x`` 的形状应为 ``[*, M, N]``,其中 ``*`` 为零或更大的批次维度,数据类型支持 float32, float64。 | ||
- **q** (int,可选) - 对输入 :math:`X` 的秩稍微高估的预估值,默认值是 None,此时 ``q`` 将取 :math:`q=min(6,N,M)`。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
q是否视作6,可以直接写简明一些
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是的,好的
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@NKNaN code style检查的CI挂了 |
:::::::::::: | ||
|
||
- **x** (Tensor) - 输入的需要进行奇异值分解的一个或一批方阵,类型为 Tensor。 ``x`` 的形状应为 ``[*, M, N]``,其中 ``*`` 为零或更大的批次维度,数据类型支持 float32, float64。 | ||
- **q** (int,可选) - 对输入 :math:`X` 的秩稍微高估的预估值,默认值为 6。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建议和前面的 q=None
统一一下描述吧,尽量减少用户的理解成本,比如 默认值为 None,代表...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的
docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.svd_lowrank.md
Outdated
Show resolved
Hide resolved
Co-authored-by: zachary sun <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
refer to: