Browse Source

!15501 Update normalization description

From: @dinglinhe123
Reviewed-by: @liangchenghui,@wuxuejian
Signed-off-by: @liangchenghui
pull/15501/MERGE
mindspore-ci-bot Gitee 5 years ago
parent
commit
3598f124ce
2 changed files with 6 additions and 6 deletions
  1. +4
    -4
      mindspore/nn/layer/normalization.py
  2. +2
    -2
      mindspore/ops/operations/nn_ops.py

+ 4
- 4
mindspore/nn/layer/normalization.py View File

@@ -770,10 +770,10 @@ class LayerNorm(Cell):
r"""
Applies Layer Normalization over a mini-batch of inputs.

Layer normalization is widely used in recurrent neural networks. It applies
Layer Normalization is widely used in recurrent neural networks. It applies
normalization on a mini-batch of inputs for each single training case as described
in the paper `Layer Normalization <https://arxiv.org/pdf/1607.06450.pdf>`_. Unlike batch
normalization, layer normalization performs exactly the same computation at training and
in the paper `Layer Normalization <https://arxiv.org/pdf/1607.06450.pdf>`_. Unlike Batch
Normalization, Layer Normalization performs exactly the same computation at training and
testing time. It can be described using the following formula. It is applied across all channels
and pixel but only one batch size.

@@ -856,7 +856,7 @@ class LayerNorm(Cell):

class InstanceNorm2d(Cell):
r"""
Instance normalization layer over a 4D input.
Instance Normalization layer over a 4D input.

This layer applies Instance Normalization over a 4D input (a mini-batch of 2D inputs with
additional channel dimension) as described in the paper `Instance Normalization: The Missing Ingredient for


+ 2
- 2
mindspore/ops/operations/nn_ops.py View File

@@ -2992,7 +2992,7 @@ class LayerNorm(Primitive):

class L2Normalize(PrimitiveWithInfer):
r"""
L2 normalization Operator.
L2 Normalization Operator.

This operator will normalize the input using the given axis. The function is shown as follows:

@@ -3002,7 +3002,7 @@ class L2Normalize(PrimitiveWithInfer):
where :math:`\epsilon` is epsilon.

Args:
axis (Union[list(int), tuple(int), int]): The starting axis for the input to apply the L2 normalization.
axis (Union[list(int), tuple(int), int]): The starting axis for the input to apply the L2 Normalization.
Default: 0.
epsilon (float): A small value added for numerical stability. Default: 1e-4.



Loading…
Cancel
Save