class_docstr: Normalize mean and variance of values based on emprical values.
  
  Args:
      shape (int or tuple of int): Shape of input values except batch axis.
      batch_axis (int): Batch axis.
      eps (float): Small value for stability.
      dtype (dtype): Dtype of input values.
      until (int or None): If this arg is specified, the link learns input
          values until the sum of batch sizes exceeds it.
class_docstr_tok: ["Normalize","mean","and","variance","of","values","based","on","emprical","values",".","Args",":","shape","(","int","or","tuple","of","int",")",":","Shape","of","input","values","except","batch","axis",".","batch_axis","(","int",")",":","Batch","axis",".","eps","(","float",")",":","Small","value","for","stability",".","dtype","(","dtype",")",":","Dtype","of","input","values",".","until","(","int","or","None",")",":","If","this","arg","is","specified",",","the","link","learns","input","values","until","the","sum","of","batch","sizes","exceeds","it","."]
code: def __init__(
      self,
      shape,
      batch_axis=0,
      eps=1e-2,
      dtype=np.float32,
      until=None,
      clip_threshold=None,
  ):
      super(EmpiricalNormalization, self).__init__()
      dtype = np.dtype(dtype)
      self.batch_axis = batch_axis
      self.eps = dtype.type(eps)
      self.until = until
      self.clip_threshold = clip_threshold
      self._mean = np.expand_dims(
          np.zeros(shape, dtype=dtype), batch_axis
      )
      self._var = np.expand_dims(
          np.ones(shape, dtype=dtype), batch_axis
      )
      self.count = 0
      self.register_persistent("_mean")
      self.register_persistent("_var")
      self.register_persistent("count")
  
      # cache
      self._cached_std_inverse = None
  
file_path: chainerrl/chainerrl/links/empirical_normalization.py
imports: import chainer
  import numpy
label_desc: Use image node_id 1 to create a new EmpiricalNormalization object from inherited base classes: chainer with example: obj = EmpiricalNormalization(shape, batch_axis, eps, dtype, until, clip_threshold)