-
Notifications
You must be signed in to change notification settings - Fork 877
new api of elu gelu relu logsigmoid, test=develop #2407
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
zhupengyang
left a comment
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
| paddle.disable_static() | ||
| x = paddle.to_tensor(np.array([[-1,6],[1,15.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.
Done
|
|
||
| 代码示例 | ||
| :::::::::: | ||
|
|
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.
少了这一行:【.. code-block:: python】
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.
Done
doc/fluid/api_cn/nn_cn/gelu_cn.rst
Outdated
| 参数: | ||
| :::::::::: | ||
| - x (Tensor) - 输入的 ``Tensor`` ,数据类型为:float32、float64。 | ||
| - approximate (bool, 可选) - 是否使用近似计算,默认值为 False。 |
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.
这里最好明确下False的行为,如:
【- approximate (bool, 可选) - 是否使用近似计算,默认值为 False,表示不使用近似计算。】
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.
Done
| ELU激活层(ELU Activation Operator) | ||
|
|
||
| 根据 https://arxiv.org/abs/1511.07289 对输入Tensor中每个元素应用以下计算。 |
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.
这里直接放链接不太好,建议改成和GELU一样的格式,可以参考:
【根据 Exponential Linear Units <https://arxiv.org/abs/1511.07289> 对输入Tensor中每个元素应用以下计算。】
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.
Done
| @@ -0,0 +1,36 @@ | |||
| .. _cn_api_nn_ReLU: | |||
|
|
|||
| ELU | |||
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.
这里应该是【ReLU】;
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.
Done
|
|
||
| ELU | ||
| ------------------------------- | ||
| .. py:class:: paddle.nn.ELU(x, alpha=1.0, name=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.
【ELU】的参数里没有【x】
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.
Done
| @@ -0,0 +1,54 @@ | |||
| .. _cn_api_fluid_layers_gelu: | |||
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.
这个地方,应该是【_cn_api_nn_GELU】
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.
Done
|
|
||
| 参数 | ||
| :::::::::: | ||
| - approximate (bool, 可选) - 是否使用近似计算,默认值为 False。 |
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.
这里最好描述下False的行为,可以参考:
【 - approximate (bool, 可选) - 是否使用近似计算,默认值为 False,即不使用近似计算。】
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.
Done
| paddle.disable_static() | ||
| data = np.random.randn(2, 3).astype("float32") | ||
| x = paddle.to_tensor(data) |
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.
Done
| LogSigmoid | ||
| ------------------------------- | ||
| .. py:class:: paddle.nn.LogSigmoid(x, name=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.
这里也没有【x】
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.
Done
| ELU | ||
| ------------------------------- | ||
| .. py:class:: paddle.nn.ReLU(x, name=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.
这里也没有 【x】
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.
Done
| elu激活层(ELU Activation Operator) | ||
|
|
||
| 根据 https://arxiv.org/abs/1511.07289 对输入Tensor中每个元素应用以下计算。 | ||
|
|
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.
根据 Exponential Linear Units <https://arxiv.org/abs/1511.07289> 对输入Tensor中每个元素应用以下计算。
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.
Done
TCChenlong
left a comment
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~








新增/修改如下2.0 API:
ELU:
GELU
ReLU
LogSigmoid