code: def layer_normalization(
      x, beta, gamma, batch_axis=0, eps=1e-05, output_stat=False
  ):
      r"""
      Applies Layer Normalization over an input tensor, which is defined as:
  
      .. math::
        \begin{eqnarray}
          \mu^l &=& \frac{1}{H} \sum_{i=1}^{H} x_i^l \\
          \sigma^l &=& \sqrt{\frac{1}{H} \sum_{i=1}^{H} \left(x_i^l - \mu^l\right)^2 + \epsilon} \\
          y &=& \frac{x - \mu^l}{\sigma^l} \gamma + \beta
        \end{eqnarray}
  
      where :math:`x` and :math:`y` are input and output variable,
      :math:`\mu^l` and :math:`\sigma^l` are the mean and std of each layer which is separately calculated for each batch,
      and :math:`\beta` and :math:`\gamma` are adaptive biases and gains.
  
      If the input shape is [B, C, H, W] (= batch_axis=0), the shape of calculated mean and std are [B, 1, 1, 1]
  
      References:
  
          * `Jimmy Lei Ba, Jamie Ryan Kiros, Geoffrey E. Hinton, Layer Normalization.
            <https://arxiv.org/abs/1607.06450>`_
  
      Args:
          x (Variable): An input variable.
          beta (Variable or None): An Adaptive biases. If None, the bias term is omitted.
          gamma (Variable or None): An Adaptive gains. If None, the scale term is omitted.
          batch_axis (int or repeated int): Axes mean and variance are taken.
          eps (float): Tiny value to avoid zero division by std.
          output_stat(bool): If true, calculated mean and variance are also returned.
  
      Returns:
          * :obj:`~nnabla.Variable`: output variable which is normalized its statics and rescaled by alpha and beta.
          * :obj:`~nnabla.Variable`: Mean (if `output_stat=True`).
          * :obj:`~nnabla.Variable`: Std (if `output_stat=True`)
      """
      from .function_bases import (
          layer_normalization as layer_normalization_base,
      )
  
      n_outputs = 3 if output_stat else 1
  
      batch_axis = _force_list(batch_axis)
  
      no_scale = gamma is None
      no_bias = beta is None
  
      return layer_normalization_base(
          x,
          beta=beta,
          gamma=gamma,
          batch_axis=batch_axis,
          eps=eps,
          no_scale=no_scale,
          no_bias=no_bias,
          n_outputs=n_outputs,
      )
  
imports: from __future__ import absolute_import
  from .function_bases import *
  from six.moves import reduce
  import numpy
  import nnabla
label_desc: Use image node_id 14 for calling a global function with example usage: layer_normalization(x, beta, gamma, batch_axis, eps, output_stat) and returns: layer_normalization_base