@@ -6949,8 +6949,15 @@ def brelu(x, t_min=0.0, t_max=24.0, name=None):
6949
6949
t_max(${t_max_type}|24.0): ${t_max_comment}
6950
6950
name(str|None): A name for this layer(optional). If set None, the layer
6951
6951
will be named automatically.
6952
- Returns:
6952
+ Returns:
6953
6953
output(${out_type}): ${out_comment}
6954
+
6955
+ Examples:
6956
+
6957
+ .. code-block:: python
6958
+
6959
+ x = fluid.layers.data(name="x", shape=[2,3,16,16], dtype="float32")
6960
+ y = fluid.layers.brelu(x, t_min=1.0, t_max=20.0)
6954
6961
"""
6955
6962
helper = LayerHelper ('brelu' , ** locals ())
6956
6963
out = helper .create_variable_for_type_inference (dtype = x .dtype )
@@ -6972,8 +6979,15 @@ def leaky_relu(x, alpha=0.02, name=None):
6972
6979
alpha(${alpha_type}|0.02): ${alpha_comment}
6973
6980
name(str|None): A name for this layer(optional). If set None, the layer
6974
6981
will be named automatically.
6975
- Returns:
6982
+ Returns:
6976
6983
output(${out_type}): ${out_comment}
6984
+
6985
+ Examples:
6986
+
6987
+ .. code-block:: python
6988
+
6989
+ x = fluid.layers.data(name="x", shape=[2,3,16,16], dtype="float32")
6990
+ y = fluid.layers.leaky_relu(x, alpha=0.01)
6977
6991
"""
6978
6992
helper = LayerHelper ('leaky_relu' , ** locals ())
6979
6993
out = helper .create_variable_for_type_inference (dtype = x .dtype )
@@ -6994,8 +7008,15 @@ def soft_relu(x, threshold=40.0, name=None):
6994
7008
threshold(${threshold_type}|40.0): ${threshold_comment}
6995
7009
name(str|None): A name for this layer(optional). If set None, the layer
6996
7010
will be named automatically.
6997
- Returns:
7011
+ Returns:
6998
7012
output(${out_type}): ${out_comment}
7013
+
7014
+ Examples:
7015
+
7016
+ .. code-block:: python
7017
+
7018
+ x = fluid.layers.data(name="x", shape=[2,3,16,16], dtype="float32")
7019
+ y = fluid.layers.soft_relu(x, threshold=20.0)
6999
7020
"""
7000
7021
helper = LayerHelper ('soft_relu' , ** locals ())
7001
7022
out = helper .create_variable_for_type_inference (dtype = x .dtype )
0 commit comments