Skip to content

Commit 2fc32b1

Browse files
authored
Merge pull request #14503 from jerrywgz/api_doc
refine prelu api doc
2 parents 39ec80d + 94de229 commit 2fc32b1

File tree

1 file changed

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

1 file changed

+10
-10
lines changed

python/paddle/fluid/layers/nn.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6972,18 +6972,18 @@ def prelu(x, mode, param_attr=None, name=None):
69726972
"""
69736973
Equation:
69746974
6975-
y = \max(0, x) + alpha \min(0, x)
6975+
y = \max(0, x) + alpha * \min(0, x)
69766976
69776977
Args:
69786978
x (Variable): The input tensor.
6979-
param_attr(ParamAttr|None): The parameter attribute for the learnable
6980-
weight (alpha).
6981-
mode (string): The mode for weight sharing
6982-
all: all elements share same weight
6983-
channel:elements in a channel share same weight
6984-
element:each element has a weight
6985-
name(str|None): A name for this layer(optional). If set None, the layer
6986-
will be named automatically.
6979+
param_attr(ParamAttr|None): The parameter attribute for the learnable
6980+
weight (alpha).
6981+
mode (string): The mode for weight sharing. It supports all, channel
6982+
and element. all: all elements share same weight
6983+
channel:elements in a channel share same weight
6984+
element:each element has a weight
6985+
name(str|None): A name for this layer(optional). If set None, the layer
6986+
will be named automatically.
69876987
69886988
Returns:
69896989
Variable: The output tensor with the same shape as input.
@@ -6992,7 +6992,7 @@ def prelu(x, mode, param_attr=None, name=None):
69926992
69936993
.. code-block:: python
69946994
6995-
x = fluid.layers.data(name="x", shape=[10,10], dtype="float32")
6995+
x = fluid.layers.data(name="x", shape=[10,10], dtype="float32")
69966996
mode = 'channel'
69976997
output = fluid.layers.prelu(x,mode)
69986998
"""

0 commit comments

Comments
 (0)