docstr: Class for applying Layer Normalization over a mini-batch of inputs.
  
  Parameters
  ----------
  num_features
      Trailing shape to applying the normalization to.
  epsilon
      small constant to add to the denominator,
      use global ivy.min_base by default.
  data_format
      The ordering of the dimensions in the input, one of "NSC" or "NCS",
      where N is the batch dimension, S represents any number of spatial
      dimensions and C is the channel dimension. Default is "NSC".
  affine
      Whether to include learnable affine parameters, default is ``True``.
  track_running_stats
      is a boolean flag that determines whether
      the running statistics should be updated
      during training in batch normalization.
  momentum
       The value used for the running_mean and running_var computation.
        Default is 0.1.
  device
      device on which to create the layer's variables 'cuda:0', 'cuda:1', 'cpu'
      etc. (Default value = None)
  v
      the variables for each submodule in the sequence,
      constructed internally by default.
  training
      If true, calculate and use the mean and variance of `x`. Otherwise, use the
      internal `mean` and `variance` when affine is True.
docstr_tok: ["Class","for","applying","Layer","Normalization","over","a","mini-batch","of","inputs",".","Parameters","--","--","--","--","--","num_features","Trailing","shape","to","applying","the","normalization","to",".","epsilon","small","constant","to","add","to","the","denominator",",","use","global","ivy.min_base","by","default",".","data_format","The","ordering","of","the","dimensions","in","the","input",",","one","of","``","NSC","''","or","``","NCS","''",",","where","N","is","the","batch","dimension",",","S","represents","any","number","of","spatial","dimensions","and","C","is","the","channel","dimension",".","Default","is","``","NSC","''",".","affine","Whether","to","include","learnable","affine","parameters",",","default","is","``","True","``",".","track_running_stats","is","a","boolean","flag","that","determines","whether","the","running","statistics","should","be","updated","during","training","in","batch","normalization",".","momentum","The","value","used","for","the","running_mean","and","running_var","computation",".","Default","is","0.1.","device","device","on","which","to","create","the","layer","'s","variables","'cuda:0","'",",","'cuda:1","'",",","'cpu'","etc",".","(","Default","value","=","None",")","v","the","variables","for","each","submodule","in","the","sequence",",","constructed","internally","by","default",".","training","If","true",",","calculate","and","use","the","mean","and","variance","of","`","x","`",".","Otherwise",",","use","the","internal","`","mean","`","and","`","variance","`","when","affine","is","True","."]
code: def __init__(
      self,
      num_features,
      /,
      *,
      eps: float = 1e-5,
      momentum: float = 0.1,
      data_format: str = "NSC",
      affine: bool = True,
      track_running_stats: bool = True,
      device=None,
      v=None,
      dtype=None,
      training=True,
  ):
      """Class for applying Layer Normalization over a mini-batch of inputs.
  
      Parameters
      ----------
      num_features
          Trailing shape to applying the normalization to.
      epsilon
          small constant to add to the denominator,
          use global ivy.min_base by default.
      data_format
          The ordering of the dimensions in the input, one of "NSC" or "NCS",
          where N is the batch dimension, S represents any number of spatial
          dimensions and C is the channel dimension. Default is "NSC".
      affine
          Whether to include learnable affine parameters, default is ``True``.
      track_running_stats
          is a boolean flag that determines whether
          the running statistics should be updated
          during training in batch normalization.
      momentum
           The value used for the running_mean and running_var computation.
            Default is 0.1.
      device
          device on which to create the layer's variables 'cuda:0', 'cuda:1', 'cpu'
          etc. (Default value = None)
      v
          the variables for each submodule in the sequence,
          constructed internally by default.
      training
          If true, calculate and use the mean and variance of `x`. Otherwise, use the
          internal `mean` and `variance` when affine is True.
      """
      self.num_features = num_features
      self._affine = affine
      self.data_format = data_format
      self._epsilon = eps
      self._momentum = momentum
      self._track_running_stats = track_running_stats
      self._weight_shape = num_features
      self._bias_shape = num_features
      self._running_mean_shape = num_features
      self._running_var_shape = num_features
      self._weight_init = Ones()
      self._bias_init = Zeros()
      self._running_mean_init = Zeros()
      self._running_var_init = Ones()
      Module.__init__(
          self, device=device, v=v, dtype=dtype, training=training
      )
  
file_path: ivy/ivy/stateful/norms.py
imports: import ivy
  from ivy.stateful.module import Module
  from ivy.stateful.initializers import Zeros, Ones
label_desc: Use image node_id 1 to create a new BatchNorm2D object from inherited base classes: Module with example: obj = BatchNorm2D()