docstr: Convert a batch of waveforms to VQT spectrograms.
  
  Parameters
  ----------
  x : torch tensor
      Input signal should be in either of the following shapes.
  
      1. ``(len_audio)``
  
      2. ``(num_audio, len_audio)``
  
      3. ``(num_audio, 1, len_audio)``
      It will be automatically broadcast to the right shape
docstr_tok: ["Convert","a","batch","of","waveforms","to","VQT","spectrograms",".","Parameters","--","--","--","--","--","x",":","torch","tensor","Input","signal","should","be","in","either","of","the","following","shapes",".","1",".","``","(","len_audio",")","``","2",".","``","(","num_audio",",","len_audio",")","``","3",".","``","(","num_audio",",","1",",","len_audio",")","``","It","will","be","automatically","broadcast","to","the","right","shape"]
code: def forward(
      self, x, output_format=None, normalization_type="librosa"
  ):
      """
      Convert a batch of waveforms to VQT spectrograms.
  
      Parameters
      ----------
      x : torch tensor
          Input signal should be in either of the following shapes.\n
          1. ``(len_audio)``\n
          2. ``(num_audio, len_audio)``\n
          3. ``(num_audio, 1, len_audio)``
          It will be automatically broadcast to the right shape
      """
      output_format = output_format or self.output_format
  
      x = broadcast_dim(x)
      if self.earlydownsample == True:
          x = downsampling_by_n(
              x, self.early_downsample_filter, self.downsample_factor
          )
      hop = self.hop_length
      vqt = []
  
      x_down = x  # Preparing a new variable for downsampling
      my_sr = self.sr
  
      for i in range(self.n_octaves):
          if i > 0:
              x_down = downsampling_by_2(x_down, self.lowpass_filter)
              hop //= 2
  
          else:
              x_down = x
  
          pad_length = int(
              getattr(self, "cqt_kernels_real_{}".format(i)).shape[-1]
              // 2
          )
          if self.pad_mode == "constant":
              my_padding = nn.ConstantPad1d((pad_length, pad_length), 0)
          elif self.pad_mode == "reflect":
              my_padding = nn.ReflectionPad1d((pad_length, pad_length))
  
          cur_vqt = get_cqt_complex(
              x_down,
              getattr(self, "cqt_kernels_real_{}".format(i)),
              getattr(self, "cqt_kernels_imag_{}".format(i)),
              hop,
              my_padding,
          )
          vqt.insert(0, cur_vqt)
  
      vqt = torch.cat(vqt, dim=1)
      vqt = vqt[:, -self.n_bins :, :]  # Removing unwanted bottom bins
      vqt = vqt * self.downsample_factor
  
      # Normalize again to get same result as librosa
      if normalization_type == "librosa":
          vqt = vqt * torch.sqrt(self.lenghts.view(-1, 1, 1))
      elif normalization_type == "convolutional":
          pass
      elif normalization_type == "wrap":
          vqt *= 2
      else:
          raise ValueError(
              "The normalization_type %r is not part of our current options."
              % normalization_type
          )
  
      if output_format == "Magnitude":
          if self.trainable == False:
              # Getting CQT Amplitude
              return torch.sqrt(vqt.pow(2).sum(-1))
          else:
              return torch.sqrt(vqt.pow(2).sum(-1) + 1e-8)
  
      elif output_format == "Complex":
          return vqt
  
      elif output_format == "Phase":
          phase_real = torch.cos(
              torch.atan2(vqt[:, :, :, 1], vqt[:, :, :, 0])
          )
          phase_imag = torch.sin(
              torch.atan2(vqt[:, :, :, 1], vqt[:, :, :, 0])
          )
          return torch.stack((phase_real, phase_imag), -1)
  
file_path: nnAudio/Installation/nnAudio/features/vqt.py
imports: import torch
  import torch.nn
  import numpy
  from time import time
  from ..librosa_functions import *
  from ..utils import *
label_desc: Use image node_id 2 for calling the VQT obj's underlying member method code with example usage: obj.forward(x, output_format, normalization_type) and returns: torch, torch, vqt, torch