class_docstr: This class implements an NMF decoder
  
  Arguments
  ---------
  n_comp : int
      Number of NMF components
  n_freq : int
      The number of frequency bins in the NMF dictionary
  device : str
      The device to run the model
  
  Example:
  --------
  >>> NMF_dec = NMFDecoderAudio(20, 210, device='cpu')
  >>> H = torch.rand(1, 20, 150)
  >>> Xhat = NMF_dec.forward(H)
  >>> print(Xhat.shape)
  torch.Size([1, 210, 150])
class_docstr_tok: ["This","class","implements","an","NMF","decoder","Arguments","--","--","--","--","-","n_comp",":","int","Number","of","NMF","components","n_freq",":","int","The","number","of","frequency","bins","in","the","NMF","dictionary","device",":","str","The","device","to","run","the","model","Example",":","--","--","--","--",">",">",">","NMF_dec","=","NMFDecoderAudio","(","20",",","210",",","device='cpu","'",")",">",">",">","H","=","torch.rand","(","1",",","20",",","150",")",">",">",">","Xhat","=","NMF_dec.forward","(","H",")",">",">",">","print","(","Xhat.shape",")","torch.Size","(","[","1",",","210",",","150","]",")"]
docstr: The forward pass for NMF given the activations H
  
  Arguments:
  ---------
  H : torch.Tensor
      The activations Tensor with shape B x n_comp x T
  
  where B = Batchsize
        n_comp = number of NMF components
        T = number of timepoints
docstr_tok: ["The","forward","pass","for","NMF","given","the","activations","H","Arguments",":","--","--","--","--","-","H",":","torch.Tensor","The","activations","Tensor","with","shape","B","x","n_comp","x","T","where","B","=","Batchsize","n_comp","=","number","of","NMF","components","T","=","number","of","timepoints"]
code: def forward(self, H):
      """The forward pass for NMF given the activations H
  
      Arguments:
      ---------
      H : torch.Tensor
          The activations Tensor with shape B x n_comp x T
  
      where B = Batchsize
            n_comp = number of NMF components
            T = number of timepoints
      """
      # Assume input of shape n_batch x n_comp x T
  
      H = self.activ(H)
      temp = self.activ(self.W).unsqueeze(0)
      output = torch.einsum("bij, bjk -> bik", temp, H)
  
      return output
  
imports: import torch.nn
  import torch.nn.functional
  import torch
  from speechbrain.lobes.models.PIQ import ResBlockAudio
label_desc: Use image node_id 2 for calling the NMFDecoderAudio obj's underlying member method code with example usage: obj.forward(H) and returns: output