Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
e647ac00
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2305
Star
20932
Fork
5423
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
e647ac00
编写于
2月 17, 2023
作者:
I
Infinity_lee
提交者:
GitHub
2月 17, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix englishdocs typo error in 8th2s (#49493)
上级
69aae171
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
24 addition
and
12 deletion
+24
-12
python/paddle/nn/functional/activation.py
python/paddle/nn/functional/activation.py
+10
-6
python/paddle/nn/layer/activation.py
python/paddle/nn/layer/activation.py
+14
-6
未找到文件。
python/paddle/nn/functional/activation.py
浏览文件 @
e647ac00
...
...
@@ -454,12 +454,14 @@ def leaky_relu(x, negative_slope=0.01, name=None):
def
prelu
(
x
,
weight
,
data_format
=
"NCHW"
,
name
=
None
):
"""
prelu activation.
prelu activation.
The calculation formula is follows:
.. math::
prelu(x) = max(0, x) + weight * min(0, x)
x and weight is input Tensor.
Parameters:
x (Tensor): The input Tensor with data type float32, float64.
weight (Tensor): The learnable parameter with data type same as ``x``.
...
...
@@ -592,8 +594,8 @@ def rrelu(x, lower=1.0 / 8.0, upper=1.0 / 3.0, training=True, name=None):
Parameters:
x (Tensor): The input Tensor with data type float16, float32, float64.
lower (float, optional): The lower bound of uniform distribution. Default:
0.125
.
upper (float, optional): The upper bound of uniform distribution. Default:
0.333
.
lower (float, optional): The lower bound of uniform distribution. Default:
1.0/8.0
.
upper (float, optional): The upper bound of uniform distribution. Default:
1.0/3.0
.
training (bool, optional): Current mode is in training or others. Default is True.
name (str, optional): For details, please refer to :ref:`api_guide_Name`. Generally, no setting is required. Default: None.
...
...
@@ -673,12 +675,14 @@ def rrelu(x, lower=1.0 / 8.0, upper=1.0 / 3.0, training=True, name=None):
def
relu
(
x
,
name
=
None
):
"""
relu activation.
relu activation.
The calculation formula is follows:
.. math::
out = max(x, 0)
x is input Tensor.
Parameters:
x (Tensor): The input Tensor with data type float32, float64.
name (str, optional): For details, please refer to :ref:`api_guide_Name`. Generally, no setting is required. Default: None.
...
...
@@ -900,8 +904,8 @@ def selu(
Parameters:
x (Tensor): The input Tensor with data type float32, float64.
scale (float, optional): The value of scale(must be greater than 1.0) for selu. Default is 1.0507009873554804934193349852946
alpha (float, optional): The value of alpha(must be no less than zero) for selu. Default is 1.6732632423543772848170429916717
scale (float, optional): The value of scale(must be greater than 1.0) for selu. Default is 1.0507009873554804934193349852946
.
alpha (float, optional): The value of alpha(must be no less than zero) for selu. Default is 1.6732632423543772848170429916717
.
name (str, optional): For details, please refer to :ref:`api_guide_Name`. Generally, no setting is required. Default: None.
Returns:
...
...
python/paddle/nn/layer/activation.py
浏览文件 @
e647ac00
...
...
@@ -356,12 +356,16 @@ class Hardtanh(Layer):
class
PReLU
(
Layer
):
"""
PReLU Activation.
PReLU Activation. The calculation formula is follows:
If approximate calculation is used:
.. math::
PReLU(x) = max(0, x) + weight * min(0, x)
x is input Tensor.
Parameters:
num_parameters (int, optional): Number of `weight` to learn. The supported values are:
1 - a single parameter `alpha` is used for all input channels;
...
...
@@ -479,8 +483,8 @@ class RReLU(Layer):
:math:`lower` and :math:`upper` are the bounds of uniform distribution.
Parameters:
lower (float, optional): The lower bound of uniform distribution. Default:
0.125
.
upper (float, optional): The upper bound of uniform distribution. Default:
0.333
.
lower (float, optional): The lower bound of uniform distribution. Default:
1.0/8.0
.
upper (float, optional): The upper bound of uniform distribution. Default:
1.0/3.0
.
name (str, optional): Name for the operation (optional, default is None).
For more information, please refer to :ref:`api_guide_Name`.
...
...
@@ -531,12 +535,14 @@ class RReLU(Layer):
class
ReLU
(
Layer
):
"""
ReLU Activation.
ReLU Activation.
The calculation formula is follows:
.. math::
ReLU(x) = max(x, 0)
x is input Tensor.
Parameters:
name (str, optional): Name for the operation (optional, default is None).
For more information, please refer to :ref:`api_guide_Name`.
...
...
@@ -577,6 +583,8 @@ class ReLU6(Layer):
ReLU6(x) = min(max(0,x), 6)
x is input Tensor.
Parameters:
name (str, optional): Name for the operation (optional, default is None).
For more information, please refer to :ref:`api_guide_Name`.
...
...
@@ -624,8 +632,8 @@ class SELU(Layer):
\right.
Parameters:
scale (float, optional): The value of scale(must be greater than 1.0) for SELU. Default is 1.0507009873554804934193349852946
alpha (float, optional): The value of alpha(must be no less than zero) for SELU. Default is 1.6732632423543772848170429916717
scale (float, optional): The value of scale(must be greater than 1.0) for SELU. Default is 1.0507009873554804934193349852946
.
alpha (float, optional): The value of alpha(must be no less than zero) for SELU. Default is 1.6732632423543772848170429916717
.
name (str, optional): Name for the operation (optional, default is None).
For more information, please refer to :ref:`api_guide_Name`.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录