-
Notifications
You must be signed in to change notification settings - Fork 762
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
base: develop
Are you sure you want to change the base?
Fix API docs #7007
Conversation
感谢你贡献飞桨文档,文档预览构建中,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, 需要转写。 | |
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.
返回了两个ret吗
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 @@ 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, 需要转写。 | |
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.
返回了两个一模一样的ret吗
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.
是的
@@ -26,4 +26,5 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | |||
| only_inputs | only_inputs | 是否只计算 inputs 的梯度。 | | |||
| allow_unused | allow_unused | 决定当某些 inputs 变量不在计算图中时抛出错误还是返回 None。 | | |||
| is_grads_batched | - | 是否反向使用批量,Paddle 无此参数,暂无转写方式。 | | |||
| materialize_grads | - | 决定将未使用输入的梯度设置为零还是 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.
- 上面的torch签名没有改
- 这句话不太通顺,
设置
改成初始化
,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.
是不初始化的意思,描述改为“决定是否将未使用输入的梯度初始化为0”吗
文档对齐