class_docstr: Performs mean and variance normalization of the input tensor.
  
  Arguments
  ---------
  mean_norm : True
       If True, the mean will be normalized.
  std_norm : True
       If True, the standard deviation will be normalized.
  norm_type : str
       It defines how the statistics are computed ('sentence' computes them
       at sentence level, 'batch' at batch level, 'speaker' at speaker
       level, while global computes a single normalization vector for all
       the sentences in the dataset). Speaker and global statistics are
       computed with a moving average approach.
  avg_factor : float
       It can be used to manually set the weighting factor between
       current statistics and accumulated ones.
  
  Example
  -------
  >>> import torch
  >>> norm = InputNormalization()
  >>> inputs = torch.randn([10, 101, 20])
  >>> inp_len = torch.ones([10])
  >>> features = norm(inputs, inp_len)
class_docstr_tok: ["Performs","mean","and","variance","normalization","of","the","input","tensor",".","Arguments","--","--","--","--","-","mean_norm",":","True","If","True",",","the","mean","will","be","normalized",".","std_norm",":","True","If","True",",","the","standard","deviation","will","be","normalized",".","norm_type",":","str","It","defines","how","the","statistics","are","computed","(","'sentence","'","computes","them","at","sentence","level",",","'batch","'","at","batch","level",",","'speaker","'","at","speaker","level",",","while","global","computes","a","single","normalization","vector","for","all","the","sentences","in","the","dataset",")",".","Speaker","and","global","statistics","are","computed","with","a","moving","average","approach",".","avg_factor",":","float","It","can","be","used","to","manually","set","the","weighting","factor","between","current","statistics","and","accumulated","ones",".","Example","--","--","--","-",">",">",">","import","torch",">",">",">","norm","=","InputNormalization","(",")",">",">",">","inputs","=","torch.randn","(","[","10",",","101",",","20","]",")",">",">",">","inp_len","=","torch.ones","(","[","10","]",")",">",">",">","features","=","norm","(","inputs",",","inp_len",")"]
code: def __init__(
      self,
      mean_norm=True,
      std_norm=True,
      norm_type="global",
      avg_factor=None,
      requires_grad=False,
      update_until_epoch=3,
  ):
      super().__init__()
      self.mean_norm = mean_norm
      self.std_norm = std_norm
      self.norm_type = norm_type
      self.avg_factor = avg_factor
      self.requires_grad = requires_grad
      self.glob_mean = torch.tensor([0])
      self.glob_std = torch.tensor([0])
      self.spk_dict_mean = {}
      self.spk_dict_std = {}
      self.spk_dict_count = {}
      self.weight = 1.0
      self.count = 0
      self.eps = 1e-10
      self.update_until_epoch = update_until_epoch
  
imports: import math
  import torch
  import logging
  from speechbrain.utils.checkpoints import mark_as_saver, mark_as_loader, mark_as_transfer, register_checkpoint_hooks
  from speechbrain.dataio.dataio import length_to_mask
label_desc: Use image node_id 1 to create a new InputNormalization object from inherited base classes: torch.nn with example: obj = InputNormalization(mean_norm, std_norm, norm_type, avg_factor, requires_grad, update_until_epoch)