Skip to content

Commit 9e33213

Browse files
committed
test=develop
1 parent b4a9c18 commit 9e33213

File tree

1 file changed

+16
-7
lines changed
  • python/paddle/fluid/layers

1 file changed

+16
-7
lines changed

python/paddle/fluid/layers/nn.py

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2243,19 +2243,28 @@ def layer_norm(input,
22432243
Args:
22442244
input(Variable): The input tensor variable.
22452245
scale(bool): Whether to learn the adaptive gain :math:`g` after
2246-
normalization.
2246+
normalization. Default True.
22472247
shift(bool): Whether to learn the adaptive bias :math:`b` after
2248-
normalization.
2249-
begin_norm_axis(bool): The normalization will be performed along
2248+
normalization. Default True.
2249+
begin_norm_axis(int): The normalization will be performed along
22502250
dimensions from :attr:`begin_norm_axis` to :attr:`rank(input)`.
2251+
Default 1.
22512252
epsilon(float): The small value added to the variance to prevent
2252-
division by zero.
2253+
division by zero. Default 1e-05.
22532254
param_attr(ParamAttr|None): The parameter attribute for the learnable
2254-
gain :math:`g`.
2255+
gain :math:`g`. If :attr:`scale` is False, :attr:`param_attr` is
2256+
omitted. If :attr:`scale` is True and :attr:`param_attr` is None,
2257+
a default :code:`ParamAttr` would be added as scale. The
2258+
:attr:`param_attr` is initialized as 1 if it is added. Default None.
22552259
bias_attr(ParamAttr|None): The parameter attribute for the learnable
2256-
bias :math:`b`.
2260+
bias :math:`b`. If :attr:`shift` is False, :attr:`bias_attr` is
2261+
omitted. If :attr:`shift` is True and :attr:`param_attr` is None,
2262+
a default :code:`ParamAttr` would be added as bias. The
2263+
:attr:`bias_attr` is initialized as 0 if it is added. Default None.
22572264
act(str): Activation to be applied to the output of layer normalizaiton.
2258-
name (str): The name of this layer. It is optional.
2265+
Default None.
2266+
name(str): The name of this layer. It is optional. Default None, and a
2267+
unique name would be generated automatically.
22592268
22602269
Returns:
22612270
${y_comment}

0 commit comments

Comments
 (0)