From 0e1b426c839d8c91952b7d18139d3681beaa726f Mon Sep 17 00:00:00 2001 From: jerrywgz Date: Tue, 20 Nov 2018 07:02:12 +0000 Subject: [PATCH] refine prelu api doc, test=develop --- python/paddle/fluid/layers/nn.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index 99acd7e308..5749bcc54a 100644 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -6900,18 +6900,18 @@ def prelu(x, mode, param_attr=None, name=None): """ Equation: - y = \max(0, x) + alpha \min(0, x) + y = \max(0, x) + alpha * \min(0, x) Args: x (Variable): The input tensor. param_attr(ParamAttr|None): The parameter attribute for the learnable - weight (alpha). - mode (string): The mode for weight sharing - all: all elements share same weight - channel:elements in a channel share same weight - element:each element has a weight + weight (alpha). + mode (string): The mode for weight sharing. It supports all, channel + and element. all: all elements share same weight + channel:elements in a channel share same weight + element:each element has a weight name(str|None): A name for this layer(optional). If set None, the layer - will be named automatically. + will be named automatically. Returns: Variable: The output tensor with the same shape as input. @@ -6921,8 +6921,8 @@ def prelu(x, mode, param_attr=None, name=None): .. code-block:: python x = fluid.layers.data(name="x", shape=[10,10], dtype="float32") - mode = 'channel' - output = fluid.layers.prelu(x,mode) + mode = 'channel' + output = fluid.layers.prelu(x,mode) """ helper = LayerHelper('prelu', **locals()) if mode not in ['all', 'channel', 'element']: -- GitLab