class_docstr: Convolutional Layers to estimate NMF Activations from Classifier Representations
  
  Arguments
  ---------
  n_comp : int
      Number of NMF components (or equivalently number of neurons at the output per timestep)
  T: int
      The targeted length along the time dimension
  in_emb_dims: List with int elements
      A list with length 3 that contains the dimensionality of the input dimensions
      The list needs to match the number of channels in the input classifier representations
      The last entry should be the smallest entry
  
  Example
  -------
  >>> inp = [torch.ones(2, 150, 6, 2), torch.ones(2, 100, 6, 2), torch.ones(2, 50, 12, 5)]
  >>> psi = Psi(n_comp=100, T=120, in_emb_dims=[150, 100, 50])
  >>> h = psi(inp)
  >>> print(h.shape)
  torch.Size([2, 100, 120])
class_docstr_tok: ["Convolutional","Layers","to","estimate","NMF","Activations","from","Classifier","Representations","Arguments","--","--","--","--","-","n_comp",":","int","Number","of","NMF","components","(","or","equivalently","number","of","neurons","at","the","output","per","timestep",")","T",":","int","The","targeted","length","along","the","time","dimension","in_emb_dims",":","List","with","int","elements","A","list","with","length","3","that","contains","the","dimensionality","of","the","input","dimensions","The","list","needs","to","match","the","number","of","channels","in","the","input","classifier","representations","The","last","entry","should","be","the","smallest","entry","Example","--","--","--","-",">",">",">","inp","=","[","torch.ones","(","2",",","150",",","6",",","2",")",",","torch.ones","(","2",",","100",",","6",",","2",")",",","torch.ones","(","2",",","50",",","12",",","5",")","]",">",">",">","psi","=","Psi","(","n_comp=100",",","T=120",",","in_emb_dims=","[","150",",","100",",","50","]",")",">",">",">","h","=","psi","(","inp",")",">",">",">","print","(","h.shape",")","torch.Size","(","[","2",",","100",",","120","]",")"]
docstr: Computes NMF activations given classifier hidden representations
docstr_tok: ["Computes","NMF","activations","given","classifier","hidden","representations"]
code: def __init__(self, n_comp=100, T=431, in_emb_dims=[2048, 1024, 512]):
      """
      Computes NMF activations given classifier hidden representations
      """
      super(Psi, self).__init__()
      self.in_emb_dims = in_emb_dims
      self.upsamp = nn.UpsamplingBilinear2d(scale_factor=(2, 2))
      self.upsamp_time = nn.UpsamplingBilinear2d(size=(T, 1))
      out_c = min(in_emb_dims)
  
      self.c1 = nn.Conv2d(
          in_emb_dims[0], out_c, kernel_size=3, padding="same"
      )
      self.c2 = nn.Conv2d(
          in_emb_dims[1], out_c, kernel_size=3, padding="same"
      )
  
      self.out_conv = nn.Conv2d(
          out_c, n_comp, kernel_size=3, padding="same"
      )
  
      self.conv = nn.Sequential(
          nn.Conv2d(out_c * 3, out_c, kernel_size=3, padding="same"),
          nn.BatchNorm2d(out_c),
          nn.ReLU(),
      )
  
      self.act = nn.ReLU()
  
imports: import torch.nn
  import torch.nn.functional
  import torch
  from speechbrain.lobes.models.PIQ import ResBlockAudio
label_desc: Use image node_id 1 to create a new Psi object from inherited base classes: nn with example: obj = Psi(n_comp, T, in_emb_dims)