-
Notifications
You must be signed in to change notification settings - Fork 837
在KaimingNormal/Uniform中加入mode参数 #7324
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
Conversation
modified: docs/api/paddle/nn/initializer/KaimingNormal_cn.rst modified: docs/guides/model_convert/convert_from_pytorch/api_difference/init/torch.nn.init.kaiming_normal_.md
@@ -27,7 +28,7 @@ paddle.nn.initializer.KaimingNormal(fan_in=None, | |||
| tensor | - | n 维 tensor。Paddle 无此参数,因为是通过调用类的 __call__ 函数来进行 tensor 的初始化。 | | |||
| a | negative_slope | 只适用于使用 leaky_relu 作为激活函数时的 negative_slope 参数。仅参数名不一致。 | | |||
| nonlinearity | nonlinearity | 非线性激活函数。参数默认值不一样,PyTorch 默认值为`leaky_relu`,Paddle 默认值为`relu`,Paddle 需保持与 PyTorch 一致。 | | |||
| mode | - | "fan_in"(默认)或 "fan_out"。Paddle 无此参数,mode="fan_out"时,Paddle 无此参数,暂无转写方式。 | | |||
| mode | mode | "fan_in"(默认)或 "fan_out"。Paddle 中的 fan_in 参数仅在 mode="fan_in"时生效。 | |
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.
无需:Paddle 中的 fan_in 参数仅在 mode="fan_in"时生效。
只需写:
"fan_in"(默认)或 "fan_out"。参数完全一致。
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.
嗯,收到,已修改
@@ -22,6 +22,7 @@ Kaiming 正态分布方式的权重初始化函数,方法来自 Kaiming He,X | |||
- **fan_in** (float16|float32,可选) - 可训练的 Tensor 的 in_features 值。如果设置为 None,程序会自动计算该值。如果你不想使用 in_features,你可以自己设置这个值。默认值为 None。 | |||
- **negative_slope** (float,可选) - 只适用于使用 leaky_relu 作为激活函数时的 negative_slope 参数。默认值为 :math:`0.0`。 | |||
- **nonlinearity** (str,可选) - 非线性激活函数。默认值为 relu。 | |||
- **mode** (str,可选):初始化的模式,参数为 'fan_in' 或 'fan_out'。当设置为 'fan_in' 时,将使用 fan_in 参数进行初始化。当设置为 'fan_out' 时,将使用可训练 Tensor 的 out_features 值进行初始化。默认为 'fan_in' |
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.
嗯,收到,已修改
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-7324.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
modified: docs/api/paddle/nn/initializer/KaimingNormal_cn.rst modified: docs/guides/model_convert/convert_from_pytorch/api_difference/init/torch.nn.init.kaiming_normal_.md
modified: docs/api/paddle/nn/initializer/KaimingNormal_cn.rst modified: docs/api/paddle/nn/initializer/KaimingUniform_cn.rst modified: docs/guides/model_convert/convert_from_pytorch/api_difference/init/torch.nn.init.kaiming_uniform_.md
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
No description provided.