@@ -6837,6 +6837,13 @@ def elu(x, alpha=1.0, name=None):
6837
6837
6838
6838
Returns:
6839
6839
output(${out_type}): ${out_comment}
6840
+
6841
+ Examples:
6842
+
6843
+ .. code-block:: python
6844
+
6845
+ x = fluid.layers.data(name="x", shape=[3,10,32,32], dtype="float32")
6846
+ y = fluid.layers.elu(x, alpha=0.2)
6840
6847
"""
6841
6848
helper = LayerHelper ('elu' , ** locals ())
6842
6849
out = helper .create_variable_for_type_inference (dtype = x .dtype )
@@ -6860,6 +6867,13 @@ def relu6(x, threshold=6.0, name=None):
6860
6867
6861
6868
Returns:
6862
6869
output(${out_type}): ${out_comment}
6870
+
6871
+ Examples:
6872
+
6873
+ .. code-block:: python
6874
+
6875
+ x = fluid.layers.data(name="x", shape=[3,10,32,32], dtype="float32")
6876
+ y = fluid.layers.relu6(x, threshold=6.0)
6863
6877
"""
6864
6878
helper = LayerHelper ('relu6' , ** locals ())
6865
6879
out = helper .create_variable_for_type_inference (dtype = x .dtype )
@@ -6883,6 +6897,13 @@ def pow(x, factor=1.0, name=None):
6883
6897
6884
6898
Returns:
6885
6899
output(${out_type}): ${out_comment}
6900
+
6901
+ Examples:
6902
+
6903
+ .. code-block:: python
6904
+
6905
+ x = fluid.layers.data(name="x", shape=[3,10,32,32], dtype="float32")
6906
+ y = fluid.layers.pow(x, factor=2.0)
6886
6907
"""
6887
6908
helper = LayerHelper ('pow' , ** locals ())
6888
6909
out = helper .create_variable_for_type_inference (dtype = x .dtype )
@@ -6907,6 +6928,13 @@ def stanh(x, scale_a=2.0 / 3.0, scale_b=1.7159, name=None):
6907
6928
6908
6929
Returns:
6909
6930
output(${out_type}): ${out_comment}
6931
+
6932
+ Examples:
6933
+
6934
+ .. code-block:: python
6935
+
6936
+ x = fluid.layers.data(name="x", shape=[3,10,32,32], dtype="float32")
6937
+ y = fluid.layers.stanh(x, scale_a=0.67, scale_b=1.72)
6910
6938
"""
6911
6939
helper = LayerHelper ('stanh' , ** locals ())
6912
6940
out = helper .create_variable_for_type_inference (dtype = x .dtype )
@@ -6932,6 +6960,13 @@ def hard_sigmoid(x, slope=0.2, offset=0.5, name=None):
6932
6960
6933
6961
Returns:
6934
6962
output(${out_type}): ${out_comment}
6963
+
6964
+ Examples:
6965
+
6966
+ .. code-block:: python
6967
+
6968
+ x = fluid.layers.data(name="x", shape=[3,10,32,32], dtype="float32")
6969
+ y = fluid.layers.hard_sigmoid(x, slope=0.3, offset=0.8)
6935
6970
"""
6936
6971
helper = LayerHelper ('hard_sigmoid' , ** locals ())
6937
6972
out = helper .create_variable_for_type_inference (dtype = x .dtype )
@@ -6956,6 +6991,13 @@ def swish(x, beta=1.0, name=None):
6956
6991
6957
6992
Returns:
6958
6993
output(${out_type}): ${out_comment}
6994
+
6995
+ Examples:
6996
+
6997
+ .. code-block:: python
6998
+
6999
+ x = fluid.layers.data(name="x", shape=[3,10,32,32], dtype="float32")
7000
+ y = fluid.layers.swish(x, beta=2.0)
6959
7001
"""
6960
7002
helper = LayerHelper ('swish' , ** locals ())
6961
7003
out = helper .create_variable_for_type_inference (dtype = x .dtype )
0 commit comments