class_docstr: Wraps ``nnet.quantiser.GumbelVectorQuantizer``, see for documentation on
  arguments.
  
  Example
  -------
  >>> quantiser = W2VTargetQuantiser()
  >>> inputs = torch.rand(10, 12, 512)
  >>> output, meta = quantiser(inputs)
  >>> output.shape
  torch.Size([10, 12, 256])
docstr: Returns quantised targets plus meta information. 
docstr_tok: ["Returns","quantised","targets","plus","meta","information","."]
code: def forward(self, x):
      """Returns quantised targets plus meta information."""
      x = self.quantiser(x)
      targets = self.proj(x["x"])
      code_perplex = x["code_perplexity"]
      prob_perplex = x["prob_perplex"]
      num_vars = x["num_vars"]
      temp = x["temp"]
      diversity_loss = (num_vars - prob_perplex) / num_vars
      meta = {
          "diversity_loss": diversity_loss,
          "code_perplex": code_perplex,
          "prob_perplex": prob_perplex,
          "num_vars": num_vars,
          "temp": temp,
      }
      return targets, meta
  
imports: import logging
  import torch
  import torch.nn.functional
  import torch.nn
  import random
  import numpy
  from speechbrain.lobes.models.transformer.Transformer import PositionalEncoding
  from speechbrain.utils.data_utils import batch_pad_right
  from speechbrain.dataio.dataio import length_to_mask
  from speechbrain.lobes.models.convolution import ConvolutionFrontEnd
  from speechbrain.nnet.CNN import Conv1d
  from speechbrain.nnet.normalization import LayerNorm
  from speechbrain.nnet.quantisers import GumbelVectorQuantizer
label_desc: Use image node_id 2 for calling the W2VTargetQuantiser obj's underlying member method code with example usage: obj.forward(x) and returns: targets,  meta