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])
code: def __init__(
      self,
      dim=128,
      K=512,
      numclasses=50,
      activate_class_partitioning=True,
      shared_keys=0,
      use_adapter=True,
      adapter_reduce_dim=True,
  ):
      super().__init__()
      self.codebook = VQEmbedding(
          K,
          dim,
          numclasses=numclasses,
          activate_class_partitioning=activate_class_partitioning,
          shared_keys=shared_keys,
      )
      self.use_adapter = use_adapter
      self.adapter_reduce_dim = adapter_reduce_dim
      if use_adapter:
          self.adapter = ResBlockAudio(dim)
  
          if adapter_reduce_dim:
              self.down = nn.Conv2d(dim, dim, 4, (2, 2), 1)
              self.up = nn.ConvTranspose2d(dim, dim, 4, (2, 2), 1)
  
      self.decoder = nn.Sequential(
          nn.ConvTranspose2d(dim, dim, 3, (2, 2), 1),
          nn.ReLU(True),
          nn.BatchNorm2d(dim),
          nn.ConvTranspose2d(dim, dim, 4, (2, 2), 1),
          nn.ReLU(),
          nn.BatchNorm2d(dim),
          nn.ConvTranspose2d(dim, dim, 4, (2, 2), 1),
          nn.ReLU(),
          nn.BatchNorm2d(dim),
          nn.ConvTranspose2d(dim, dim, 4, (2, 2), 1),
          nn.ReLU(),
          nn.BatchNorm2d(dim),
          nn.ConvTranspose2d(dim, 1, 12, 1, 1),
      )
      self.apply(weights_init)
  
imports: import torch
  import torch.nn
  from torch.autograd import Function
label_desc: Use image node_id 1 to create a new VectorQuantizedPSI_Audio object from inherited base classes: nn with example: obj = VectorQuantizedPSI_Audio(dim, K, numclasses, activate_class_partitioning, shared_keys, use_adapter, adapter_reduce_dim)