class_docstr: This class reconstructs log-power spectrograms from classifier's representations.
  
  Arguments
  ---------
  dim : int
      Dimensionality of VQ vectors.
  K : int
      Number of elements of VQ dictionary.
  numclasses : int
      Number of possible classes
  activate_class_partitioning : bool
      `True` if latent space should be quantized for different classes.
  shared_keys : int
      Number of shared keys among classes.
  use_adapter : bool
      `True` to learn an adapter for classifier's representations.
  adapter_reduce_dim : bool
      `True` if adapter should compress representations.
  
  Returns
  --------
  Reconstructed log-power spectrograms, adapted classifier's representations, quantized classifier's representations. : tuple
  
  Example:
  --------
  >>> psi = VectorQuantizedPSI_Audio(dim=256, K=1024)
  >>> x = torch.randn(2, 256, 16, 16)
  >>> labels = torch.Tensor([0, 2])
  >>> logspectra, hcat, z_q_x = psi(x, labels)
  >>> print(logspectra.shape, hcat.shape, z_q_x.shape)
  torch.Size([2, 1, 257, 257]) torch.Size([2, 256, 8, 8]) torch.Size([2, 256, 8, 8])
docstr: Forward step. Reconstructs log-power based on provided label's keys in VQ dictionary.
  
  Arguments
  --------
  hs : torch.Tensor
      Classifier's representations.
  labels : torch.Tensor
      Predicted labels for classifier's representations.
  
  Returns
  --------
  Reconstructed log-power spectrogram, reduced classifier's representations and quantized classifier's representations. : tuple
docstr_tok: ["Forward","step",".","Reconstructs","log-power","based","on","provided","label","'s","keys","in","VQ","dictionary",".","Arguments","--","--","--","--","hs",":","torch.Tensor","Classifier","'s","representations",".","labels",":","torch.Tensor","Predicted","labels","for","classifier","'s","representations",".","Returns","--","--","--","--","Reconstructed","log-power","spectrogram",",","reduced","classifier","'s","representations","and","quantized","classifier","'s","representations",".",":","tuple"]
code: def forward(self, hs, labels):
      """
      Forward step. Reconstructs log-power based on provided label's keys in VQ dictionary.
  
      Arguments
      --------
      hs : torch.Tensor
          Classifier's representations.
      labels : torch.Tensor
          Predicted labels for classifier's representations.
  
      Returns
      --------
      Reconstructed log-power spectrogram, reduced classifier's representations and quantized classifier's representations. : tuple
      """
      if self.use_adapter:
          hcat = self.adapter(hs)
      else:
          hcat = hs
  
      if self.adapter_reduce_dim:
          hcat = self.down(hcat)
          z_q_x_st, z_q_x = self.codebook.straight_through(hcat, labels)
          z_q_x_st = self.up(z_q_x_st)
      else:
          z_q_x_st, z_q_x = self.codebook.straight_through(hcat, labels)
      x_tilde = self.decoder(z_q_x_st)
      return x_tilde, hcat, z_q_x
  
imports: import torch
  import torch.nn
  from torch.autograd import Function
label_desc: Use image node_id 2 for calling the VectorQuantizedPSI_Audio obj's underlying member method code with example usage: obj.forward(hs, labels) and returns: x_tilde,  hcat,  z_q_x