class_docstr: This class implements the LEAF audio frontend from
  
  Neil Zeghidour, Olivier Teboul, F{'e}lix de Chaumont Quitry & Marco Tagliasacchi, "LEAF: A LEARNABLE FRONTEND
  FOR AUDIO CLASSIFICATION", in Proc. of ICLR 2021 (https://arxiv.org/abs/2101.08596)
  
  Arguments
  ---------
  out_channels : int
      It is the number of output channels.
  window_len: float
      length of filter window in milliseconds
  window_stride : float
      Stride factor of the filters in milliseconds
  sample_rate : int,
      Sampling rate of the input signals. It is only used for sinc_conv.
  min_freq : float
      Lowest possible frequency (in Hz) for a filter
  max_freq : float
      Highest possible frequency (in Hz) for a filter
  use_pcen: bool
      If True (default), a per-channel energy normalization layer is used
  learnable_pcen: bool:
      If True (default), the per-channel energy normalization layer is learnable
  use_legacy_complex: bool
      If False, torch.complex64 data type is used for gabor impulse responses
      If True, computation is performed on two real-valued tensors
  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, 8000])
  >>> leaf = Leaf(
  ...     out_channels=40, window_len=25., window_stride=10., in_channels=1
  ... )
  >>> out_tensor = leaf(inp_tensor)
  >>> out_tensor.shape
  torch.Size([10, 50, 40])
class_docstr_tok: ["This","class","implements","the","LEAF","audio","frontend","from","Neil","Zeghidour",",","Olivier","Teboul",",","F","{","'","e","}","lix","de","Chaumont","Quitry","&","Marco","Tagliasacchi",",","``","LEAF",":","A","LEARNABLE","FRONTEND","FOR","AUDIO","CLASSIFICATION","''",",","in","Proc",".","of","ICLR","2021","(","https",":","\/\/arxiv.org\/abs\/2101.08596",")","Arguments","--","--","--","--","-","out_channels",":","int","It","is","the","number","of","output","channels",".","window_len",":","float","length","of","filter","window","in","milliseconds","window_stride",":","float","Stride","factor","of","the","filters","in","milliseconds","sample_rate",":","int",",","Sampling","rate","of","the","input","signals",".","It","is","only","used","for","sinc_conv",".","min_freq",":","float","Lowest","possible","frequency","(","in","Hz",")","for","a","filter","max_freq",":","float","Highest","possible","frequency","(","in","Hz",")","for","a","filter","use_pcen",":","bool","If","True","(","default",")",",","a","per-channel","energy","normalization","layer","is","used","learnable_pcen",":","bool",":","If","True","(","default",")",",","the","per-channel","energy","normalization","layer","is","learnable","use_legacy_complex",":","bool","If","False",",","torch.complex64","data","type","is","used","for","gabor","impulse","responses","If","True",",","computation","is","performed","on","two","real-valued","tensors","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",",","8000","]",")",">",">",">","leaf","=","Leaf","(","...","out_channels=40",",","window_len=25.",",","window_stride=10.",",","in_channels=1","...",")",">",">",">","out_tensor","=","leaf","(","inp_tensor",")",">",">",">","out_tensor.shape","torch.Size","(","[","10",",","50",",","40","]",")"]
code: def _squared_modulus_activation(self, x):
      x = x.transpose(1, 2)
      output = 2 * torch.nn.functional.avg_pool1d(
          x**2.0, kernel_size=2, stride=2
      )
      output = output.transpose(1, 2)
      return output
  
file_path: speechbrain/speechbrain/lobes/features.py
imports: import torch
  from speechbrain.processing.features import STFT, spectral_magnitude, Filterbank, DCT, Deltas, ContextWindow
  from speechbrain.utils.autocast import fwd_default_precision
  from speechbrain.nnet.CNN import GaborConv1d
  from speechbrain.nnet.normalization import PCEN
  from speechbrain.nnet.pooling import GaussianLowpassPooling
label_desc: Use image node_id 3 for calling the Leaf obj's underlying member method code with example usage: obj._squared_modulus_activation(x) and returns: output