class_docstr: Group normalization layer on outputs of convolution functions.
  
  This link implements a "group normalization"
  which divides the channels into groups and computes within each group
  the mean and variance, then normalize by these statistics,
  scales and shifts them.
  Parameter initialization will be deferred until
  the first forward data pass at which time the size will be determined.
  
  Args:
      groups (int):
          The number of channel groups.
          This value must be a divisor of the number of channels.
      size (int): Size of input units. If ``None``, parameter initialization
          will be deferred until the first forward data pass at which time
          the size will be determined.
      eps (float): Epsilon value for numerical stability of normalization.
      initial_gamma (~chainer.Initializer): Initializer for
          scaling parameter.
          If ``None``, then the vector is filled by 1.
          If a scalar, the vector is filled by it.
          If ``numpy.ndarray``, the vector is set by it.
      initial_beta (~chainer.Initializer): Initializer for
          shifting parameter.
          If ``None``, then the vector is filled by 0.
          If a scalar, the vector is filled by it.
          If ``numpy.ndarray``, the vector is set by it.
  
  Attributes:
      groups (int): The number of channel groups.
      gamma (~chainer.Parameter): Scaling parameter.
      beta (~chainer.Parameter): Shifting parameter.
      ~GroupNormalization.eps (float): Epsilon value for numerical stability.
  
  See: `Group Normalization <https://arxiv.org/abs/1803.08494>`_
class_docstr_tok: ["Group","normalization","layer","on","outputs","of","convolution","functions",".","This","link","implements","a","``","group","normalization","''","which","divides","the","channels","into","groups","and","computes","within","each","group","the","mean","and","variance",",","then","normalize","by","these","statistics",",","scales","and","shifts","them",".","Parameter","initialization","will","be","deferred","until","the","first","forward","data","pass","at","which","time","the","size","will","be","determined",".","Args",":","groups","(","int",")",":","The","number","of","channel","groups",".","This","value","must","be","a","divisor","of","the","number","of","channels",".","size","(","int",")",":","Size","of","input","units",".","If","``","None","``",",","parameter","initialization","will","be","deferred","until","the","first","forward","data","pass","at","which","time","the","size","will","be","determined",".","eps","(","float",")",":","Epsilon","value","for","numerical","stability","of","normalization",".","initial_gamma","(","~chainer.Initializer",")",":","Initializer","for","scaling","parameter",".","If","``","None","``",",","then","the","vector","is","filled","by","1",".","If","a","scalar",",","the","vector","is","filled","by","it",".","If","``","numpy.ndarray","``",",","the","vector","is","set","by","it",".","initial_beta","(","~chainer.Initializer",")",":","Initializer","for","shifting","parameter",".","If","``","None","``",",","then","the","vector","is","filled","by","0",".","If","a","scalar",",","the","vector","is","filled","by","it",".","If","``","numpy.ndarray","``",",","the","vector","is","set","by","it",".","Attributes",":","groups","(","int",")",":","The","number","of","channel","groups",".","gamma","(","~chainer.Parameter",")",":","Scaling","parameter",".","beta","(","~chainer.Parameter",")",":","Shifting","parameter",".","~GroupNormalization.eps","(","float",")",":","Epsilon","value","for","numerical","stability",".","See",":","`","Group","Normalization","<","https",":","\/\/arxiv.org\/abs\/1803.08494",">","`","_"]
code: def __init__(
      self,
      groups,
      size=None,
      eps=1e-5,
      initial_gamma=None,
      initial_beta=None,
  ):
      super(GroupNormalization, self).__init__()
      if initial_gamma is None:
          initial_gamma = 1
      if initial_beta is None:
          initial_beta = 0
  
      highprec_dtype = chainer.get_dtype(
          None, map_mixed16=numpy.float32
      )
  
      with self.init_scope():
          self.groups = groups
          gamma_initializer = initializers._get_initializer(
              initial_gamma
          )
          gamma_initializer.dtype = highprec_dtype
          beta_initializer = initializers._get_initializer(initial_beta)
          beta_initializer.dtype = highprec_dtype
          self.gamma = variable.Parameter(gamma_initializer)
          self.beta = variable.Parameter(beta_initializer)
          self.eps = eps
  
      if size is not None:
          self._initialize_params(size)
  
file_path: chainer/chainer/links/normalization/group_normalization.py
imports: import numpy
  import chainer
  from chainer.functions.normalization import group_normalization
  from chainer import initializers
  from chainer import link
  from chainer import variable
label_desc: Use image node_id 1 to create a new GroupNormalization object from inherited base classes: link with example: obj = GroupNormalization(groups, size, eps, initial_gamma, initial_beta)