class_docstr: GroupNorm normalization layer (Wu and He, 2014).
  
  Parameters
  ----------
  ngroups : int
      Numnber of channel groups in GN.
  in_channels : int, default 0
      Number of channels (feature maps) in input data. If not specified,
      initialization will be deferred to the first time `forward` is called
      and `in_channels` will be inferred from the shape of input data.
  axis : int, default 1
      The axis that should be normalized. This is typically the channels
      (C) axis. For instance, after a `Conv2D` layer with `layout='NCHW'`,
      set `axis=1` in `GroupNorm`. If `layout='NHWC'`, then set `axis=3`.
  epsilon: float, default 1e-5
      Small float added to variance to avoid dividing by zero.
  beta_initializer: str or `Initializer`, default 'zeros'
      Initializer for the beta weight.
  gamma_initializer: str or `Initializer`, default 'ones'
      Initializer for the gamma weight.
  scale: bool, default True
      If True, multiply by `gamma`. If False, `gamma` is not used.
  
  Inputs:
      - **data**: input tensor with arbitrary shape.
  
  Outputs:
      - **out**: output tensor with the same shape as `data`.
code: def __init__(
      self,
      ngroups=32,
      in_channels=0,
      axis=1,
      epsilon=1e-5,
      beta_initializer="zeros",
      gamma_initializer="ones",
      scale=True,
      **kwargs,
  ):
      super(GroupNorm, self).__init__(**kwargs)
      self._kwargs = {
          "axis": axis,
          "eps": epsilon,
          "momentum": 0,
          "fix_gamma": True,
          "use_global_stats": False,
      }
      self.ngroups = ngroups
      self.scale = scale
      assert (
          in_channels % ngroups == 0
      ), "Channel number should be divisible by groups."
      if in_channels != 0:
          self.in_channels = in_channels
  
      self.gamma = self.params.get(
          "gamma",
          grad_req="write",
          shape=(in_channels,),
          init=gamma_initializer,
          allow_deferred_init=True,
          differentiable=True,
      )
      self.beta = self.params.get(
          "beta",
          grad_req="write",
          shape=(in_channels,),
          init=beta_initializer,
          allow_deferred_init=True,
          differentiable=True,
      )
      # hacky
      self.inited = False
  
file_path: gluon-cv/gluoncv/nn/gn.py
imports: import numpy
  from mxnet.gluon.block import HybridBlock
  from mxnet import autograd
label_desc: Use image node_id 1 to create a new GroupNorm object from inherited base classes: HybridBlock with example: obj = GroupNorm(ngroups, in_channels, axis, epsilon, beta_initializer, gamma_initializer, scale)