class_docstr: Applies learnable exponential moving average, as required by learnable PCEN layer
  
  Arguments
  ---------
  input_size : int
      The expected size of the input.
  coeff_init: float
      Initial smoothing coefficient value
  per_channel: bool
      Controls whether every smoothing coefficients are learned
      independently for every input channel
  trainable: bool
      whether to learn the PCEN parameters or use fixed
  skip_transpose : bool
      If False, uses batch x time x channel convention of speechbrain.
      If True, uses batch x channel x time convention.
  
  Example
  -------
  >>> inp_tensor = torch.rand([10, 50, 40])
  >>> pcen = ExponentialMovingAverage(40)
  >>> out_tensor = pcen(inp_tensor)
  >>> out_tensor.shape
  torch.Size([10, 50, 40])
class_docstr_tok: ["Applies","learnable","exponential","moving","average",",","as","required","by","learnable","PCEN","layer","Arguments","--","--","--","--","-","input_size",":","int","The","expected","size","of","the","input",".","coeff_init",":","float","Initial","smoothing","coefficient","value","per_channel",":","bool","Controls","whether","every","smoothing","coefficients","are","learned","independently","for","every","input","channel","trainable",":","bool","whether","to","learn","the","PCEN","parameters","or","use","fixed","skip_transpose",":","bool","If","False",",","uses","batch","x","time","x","channel","convention","of","speechbrain",".","If","True",",","uses","batch","x","channel","x","time","convention",".","Example","--","--","--","-",">",">",">","inp_tensor","=","torch.rand","(","[","10",",","50",",","40","]",")",">",">",">","pcen","=","ExponentialMovingAverage","(","40",")",">",">",">","out_tensor","=","pcen","(","inp_tensor",")",">",">",">","out_tensor.shape","torch.Size","(","[","10",",","50",",","40","]",")"]
code: def __init__(
      self,
      input_size: int,
      coeff_init: float = 0.04,
      per_channel: bool = False,
      trainable: bool = True,
      skip_transpose: bool = False,
  ):
      super(ExponentialMovingAverage, self).__init__()
      self._coeff_init = coeff_init
      self._per_channel = per_channel
      self.skip_transpose = skip_transpose
      self.trainable = trainable
      weights = (
          torch.ones(
              input_size,
          )
          if self._per_channel
          else torch.ones(
              1,
          )
      )
      self._weights = nn.Parameter(
          weights * self._coeff_init, requires_grad=trainable
      )
  
imports: import torch
  import torch.nn
label_desc: Use image node_id 1 to create a new ExponentialMovingAverage object from inherited base classes: nn with example: obj = ExponentialMovingAverage(input_size, coeff_init, per_channel, trainable, skip_transpose)