class_docstr: Applies a `Group Normalization <https://arxiv.org/abs/1803.08494>`_ over an input tensor
  
  Args:
      num_groups (int): number of groups to separate the input channels into
      num_features (int): :math:`C` from an expected input of size :math:`(N, C, *)`
      eps (Optional, float): Value added to the denominator for numerical stability. Default: 1e-5
      affine (bool): If ``True``, use learnable affine parameters. Default: ``True``
  
  Shape:
      - Input: :math:`(N, C, *)` where :math:`N` is the batch size, :math:`C` is the number of input channels,
      and :math:`*` is the remaining dimensions of the input tensor
      - Output: same shape as the input
  
  .. note::
      GroupNorm is the same as LayerNorm when `num_groups=1` and it is the same as InstanceNorm when
      `num_groups=C`.
class_docstr_tok: ["Applies","a","`","Group","Normalization","<","https",":","\/\/arxiv.org\/abs\/1803.08494",">","`","_","over","an","input","tensor","Args",":","num_groups","(","int",")",":","number","of","groups","to","separate","the","input","channels","into","num_features","(","int",")",":",":","math",":","`","C","`","from","an","expected","input","of","size",":","math",":","`","(","N",",","C",",","*",")","`","eps","(","Optional",",","float",")",":","Value","added","to","the","denominator","for","numerical","stability",".","Default",":","1e-5","affine","(","bool",")",":","If","``","True","``",",","use","learnable","affine","parameters",".","Default",":","``","True","``","Shape",":","-","Input",":",":","math",":","`","(","N",",","C",",","*",")","`","where",":","math",":","`","N","`","is","the","batch","size",",",":","math",":","`","C","`","is","the","number","of","input","channels",",","and",":","math",":","`","*","`","is","the","remaining","dimensions","of","the","input","tensor","-","Output",":","same","shape","as","the","input","..","note",":",":","GroupNorm","is","the","same","as","LayerNorm","when","`","num_groups=1","`","and","it","is","the","same","as","InstanceNorm","when","`","num_groups=C","`","."]
code: def __init__(
      self,
      num_groups: int,
      num_features: int,
      eps: Optional[float] = 1e-5,
      affine: Optional[bool] = True,
      *args,
      **kwargs,
  ) -> None:
      super().__init__(
          num_groups=num_groups,
          num_channels=num_features,
          eps=eps,
          affine=affine,
      )
  
imports: from typing import Optional
  from torch import Tensor, nn
  from cvnets.layers.normalization import register_norm_fn
label_desc: Use image node_id 1 to create a new GroupNorm object from inherited base classes: nn with example: obj = GroupNorm(num_groups, num_features, eps, affine)