chainer.functions.layer_normalization

chainer.functions.layer_normalization(x, gamma, beta, eps=1e-05)[source]

Layer normalization.

This function implements a “layer normalization” which normalizes the input units by statistics that are computed along the second axis, scales and shifts them.

Parameters:
  • x (Variable) – Batch vectors. Shape of this value must be (batch_size, unit_size), e.g., the output of linear().
  • gamma (Variable) – Scaling vectors.
  • beta (Variable) – Shifting vectors.
Returns:

The output variable which has the same shape as \(x\).

Return type:

Variable

See: Layer Normalization