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

Fix API docs #7007

Open
wants to merge 22 commits into
base: develop
Choose a base branch
from
Open

Fix API docs #7007

wants to merge 22 commits into from

Conversation

Xuxuanang
Copy link
Contributor

文档对齐

Copy link

paddle-bot bot commented Dec 2, 2024

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

@@ -22,7 +22,7 @@ paddle.nn.GRUCell(input_size, hidden_size, weight_ih_attr=None, weight_hh_attr=N
| dtype | - | Tensor 的所需数据类型,Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 |
| - |weight_ih_attr| weight_ih 的参数, PyTorch 无此参数, Paddle 保持默认即可。 |
| - |weight_hh_attr| weight_hh 的参数, PyTorch 无此参数, Paddle 保持默认即可。 |

| forward 类方法返回值 |forward 类方法返回值 | PyTorch 的返回值为更新后的隐藏状态 ret, Paddle 返回值为 ret、 ret, 需要转写。 |
Copy link
Collaborator

Choose a reason for hiding this comment

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

返回了两个ret吗

Copy link
Contributor Author

Choose a reason for hiding this comment

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

是的

@@ -20,6 +20,7 @@ paddle.nn.SimpleRNNCell(input_size, hidden_size, activation='tanh', weight_ih_at
| nonlinearity | activation | 表示激活函数类型,仅参数名不一致。 |
| - |weight_ih_attr| weight_ih 的参数, PyTorch 无此参数, Paddle 保持默认即可。 |
| - |weight_hh_attr| weight_hh 的参数, PyTorch 无此参数, Paddle 保持默认即可。 |
| forward 类方法返回值 |forward 类方法返回值 | PyTorch 的返回值为更新后的隐藏状态 ret, Paddle 返回值为 ret、 ret, 需要转写。 |
Copy link
Collaborator

Choose a reason for hiding this comment

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

返回了两个一模一样的ret吗

Copy link
Contributor Author

Choose a reason for hiding this comment

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

是的

@@ -26,4 +26,5 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下:
| only_inputs | only_inputs | 是否只计算 inputs 的梯度。 |
| allow_unused | allow_unused | 决定当某些 inputs 变量不在计算图中时抛出错误还是返回 None。 |
| is_grads_batched | - | 是否反向使用批量,Paddle 无此参数,暂无转写方式。 |
| materialize_grads | - | 决定将未使用输入的梯度设置为零还是 None,暂无转写方式。 |
Copy link
Collaborator

Choose a reason for hiding this comment

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

  1. 上面的torch签名没有改
  2. 这句话不太通顺,设置 改成 初始化,None是啥意思,是不初始化的意思吗?这个描述不太地道

Copy link
Contributor Author

Choose a reason for hiding this comment

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

是不初始化的意思,描述改为“决定是否将未使用输入的梯度初始化为0”吗

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