Skip to content
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

【映射文档】新增与维护部分映射文档 part2 #6500

Merged
merged 6 commits into from
Feb 20, 2024

Conversation

RedContritio
Copy link
Contributor

  • 新增了部分映射文档,基于 PaConvert 已实现的 api 映射

尚有约 50 个已实现的 api 映射尚未添加映射文档。

Copy link

paddle-bot bot commented Feb 5, 2024

感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-6500.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html
预览工具的更多说明,请参考:飞桨文档预览工具

Copy link
Collaborator

@zhwesky2010 zhwesky2010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

注意格式规范
注意参数映射里不用过多介绍这个参数,重点是突出两个参数的差异,而不是这个参数的功能

Copy link
Collaborator

@zhwesky2010 zhwesky2010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

下个PR看下这两个问题

| ---------- | ------------ | -- |
| loc | loc | 偏置参数。 |
| scale | scale | 缩放参数。 |
| event_dim | - | event_shape 可选尺寸。对于单随机变量为 0,对于向量分布为 1,对于矩阵分布为 2。Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个可直接删除吗,没有影响吗

Copy link
Contributor Author

@RedContritio RedContritio Feb 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

paddle 没有描述具体实现,可能需要实验来测试。
认为没有影响是因为参考 PaConvert/#341,对该参数做了直接删除处理。
此外 tests/test_distributions_AffineTransform.py 未覆盖 0、1、2 取值。

| dim | axis | 表示进行运算的轴,仅参数名不一致。 |
| norm | norm | 表示傅里叶变换的缩放模式。 |
| out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写。 |
| norm | norm | 表示傅里叶变换的缩放模式。 |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

torch的None和 paddle的'backward' 是相同效果的吗

Copy link
Contributor Author

@RedContritio RedContritio Feb 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里 torch 会在该参数未指定或传入 None 的时候,内部使用默认值 "backward" (不依赖 python 语法的手动默认值设置)。

效果一致。

@zhwesky2010 zhwesky2010 merged commit 3723ffb into PaddlePaddle:develop Feb 20, 2024
2 checks passed
@RedContritio RedContritio deleted the add_docs_2 branch February 22, 2024 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants