@@ -6843,8 +6843,8 @@ def elu(x, alpha=1.0, name=None):
6843
6843
6844
6844
.. code-block:: python
6845
6845
6846
- x = fluid.layers.data(name="x", shape=[3,10,32,32], dtype="float32")
6847
- y = fluid.layers.elu(x, alpha=0.2)
6846
+ x = fluid.layers.data(name="x", shape=[3,10,32,32], dtype="float32")
6847
+ y = fluid.layers.elu(x, alpha=0.2)
6848
6848
"""
6849
6849
helper = LayerHelper ('elu' , ** locals ())
6850
6850
out = helper .create_variable_for_type_inference (dtype = x .dtype )
@@ -6873,8 +6873,8 @@ def relu6(x, threshold=6.0, name=None):
6873
6873
6874
6874
.. code-block:: python
6875
6875
6876
- x = fluid.layers.data(name="x", shape=[3,10,32,32], dtype="float32")
6877
- y = fluid.layers.relu6(x, threshold=6.0)
6876
+ x = fluid.layers.data(name="x", shape=[3,10,32,32], dtype="float32")
6877
+ y = fluid.layers.relu6(x, threshold=6.0)
6878
6878
"""
6879
6879
helper = LayerHelper ('relu6' , ** locals ())
6880
6880
out = helper .create_variable_for_type_inference (dtype = x .dtype )
@@ -6903,8 +6903,8 @@ def pow(x, factor=1.0, name=None):
6903
6903
6904
6904
.. code-block:: python
6905
6905
6906
- x = fluid.layers.data(name="x", shape=[3,10,32,32], dtype="float32")
6907
- y = fluid.layers.pow(x, factor=2.0)
6906
+ x = fluid.layers.data(name="x", shape=[3,10,32,32], dtype="float32")
6907
+ y = fluid.layers.pow(x, factor=2.0)
6908
6908
"""
6909
6909
helper = LayerHelper ('pow' , ** locals ())
6910
6910
out = helper .create_variable_for_type_inference (dtype = x .dtype )
@@ -6934,8 +6934,8 @@ def stanh(x, scale_a=2.0 / 3.0, scale_b=1.7159, name=None):
6934
6934
6935
6935
.. code-block:: python
6936
6936
6937
- x = fluid.layers.data(name="x", shape=[3,10,32,32], dtype="float32")
6938
- y = fluid.layers.stanh(x, scale_a=0.6667, scale_b=1.7159)
6937
+ x = fluid.layers.data(name="x", shape=[3,10,32,32], dtype="float32")
6938
+ y = fluid.layers.stanh(x, scale_a=0.6667, scale_b=1.7159)
6939
6939
"""
6940
6940
helper = LayerHelper ('stanh' , ** locals ())
6941
6941
out = helper .create_variable_for_type_inference (dtype = x .dtype )
@@ -6966,8 +6966,8 @@ def hard_sigmoid(x, slope=0.2, offset=0.5, name=None):
6966
6966
6967
6967
.. code-block:: python
6968
6968
6969
- x = fluid.layers.data(name="x", shape=[3,10,32,32], dtype="float32")
6970
- y = fluid.layers.hard_sigmoid(x, slope=0.3, offset=0.8)
6969
+ x = fluid.layers.data(name="x", shape=[3,10,32,32], dtype="float32")
6970
+ y = fluid.layers.hard_sigmoid(x, slope=0.3, offset=0.8)
6971
6971
"""
6972
6972
helper = LayerHelper ('hard_sigmoid' , ** locals ())
6973
6973
out = helper .create_variable_for_type_inference (dtype = x .dtype )
@@ -6997,8 +6997,8 @@ def swish(x, beta=1.0, name=None):
6997
6997
6998
6998
.. code-block:: python
6999
6999
7000
- x = fluid.layers.data(name="x", shape=[3,10,32,32], dtype="float32")
7001
- y = fluid.layers.swish(x, beta=2.0)
7000
+ x = fluid.layers.data(name="x", shape=[3,10,32,32], dtype="float32")
7001
+ y = fluid.layers.swish(x, beta=2.0)
7002
7002
"""
7003
7003
helper = LayerHelper ('swish' , ** locals ())
7004
7004
out = helper .create_variable_for_type_inference (dtype = x .dtype )
@@ -7034,9 +7034,9 @@ def prelu(x, mode, param_attr=None, name=None):
7034
7034
7035
7035
.. code-block:: python
7036
7036
7037
- x = fluid.layers.data(name="x", shape=[10,10], dtype="float32")
7038
- mode = 'channel'
7039
- output = fluid.layers.prelu(x,mode)
7037
+ x = fluid.layers.data(name="x", shape=[10,10], dtype="float32")
7038
+ mode = 'channel'
7039
+ output = fluid.layers.prelu(x,mode)
7040
7040
"""
7041
7041
helper = LayerHelper ('prelu' , ** locals ())
7042
7042
if mode not in ['all' , 'channel' , 'element' ]:
0 commit comments