Skip to content

Commit 0e1b426

Browse files
author
jerrywgz
committed
refine prelu api doc, test=develop
1 parent f17b05d commit 0e1b426

File tree

1 file changed

+9
-9
lines changed
  • python/paddle/fluid/layers

1 file changed

+9
-9
lines changed

python/paddle/fluid/layers/nn.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6900,18 +6900,18 @@ def prelu(x, mode, param_attr=None, name=None):
69006900
"""
69016901
Equation:
69026902
6903-
y = \max(0, x) + alpha \min(0, x)
6903+
y = \max(0, x) + alpha * \min(0, x)
69046904
69056905
Args:
69066906
x (Variable): The input tensor.
69076907
param_attr(ParamAttr|None): The parameter attribute for the learnable
6908-
weight (alpha).
6909-
mode (string): The mode for weight sharing
6910-
all: all elements share same weight
6911-
channel:elements in a channel share same weight
6912-
element:each element has a weight
6908+
weight (alpha).
6909+
mode (string): The mode for weight sharing. It supports all, channel
6910+
and element. all: all elements share same weight
6911+
channel:elements in a channel share same weight
6912+
element:each element has a weight
69136913
name(str|None): A name for this layer(optional). If set None, the layer
6914-
will be named automatically.
6914+
will be named automatically.
69156915
69166916
Returns:
69176917
Variable: The output tensor with the same shape as input.
@@ -6921,8 +6921,8 @@ def prelu(x, mode, param_attr=None, name=None):
69216921
.. code-block:: python
69226922
69236923
x = fluid.layers.data(name="x", shape=[10,10], dtype="float32")
6924-
mode = 'channel'
6925-
output = fluid.layers.prelu(x,mode)
6924+
mode = 'channel'
6925+
output = fluid.layers.prelu(x,mode)
69266926
"""
69276927
helper = LayerHelper('prelu', **locals())
69286928
if mode not in ['all', 'channel', 'element']:

0 commit comments

Comments
 (0)