class_docstr: Convolution based feature extractor from raw audio.
  Channel numbers increasing is based on https://arxiv.org/abs/2109.06870
  
  Arguments
  ---------
  out_channels : list of ints
      Out channels of convolutional layers.
  kernel_sizes : list of ints
      Kernels of convolutional layers.
  strides : list of ints
      Strides of convolutional layers.
  dropout : float
      Dropout of CNN.
  
  Example
  -------
  >>> extractor = W2VLatentExtractor()
  >>> inputs = torch.rand(10, 5000)
  >>> outputs = extractor(inputs)
  >>> outputs.shape
  torch.Size([10, 14, 512])
code: def __init__(
      self,
      out_channels=[512, 512, 512, 512, 512, 512, 512],
      kernel_sizes=[11, 3, 3, 3, 3, 3, 3],
      strides=[5, 2, 2, 2, 2, 2, 2],
      dropout=0.0,
      conv_init="kaiming",
  ):
      super().__init__()
  
      assert len(out_channels) == len(kernel_sizes) == len(strides)
  
      num_blocks = len(out_channels)
      self.kernel_sizes = kernel_sizes
      self.strides = strides
      self.out_dim = out_channels[-1]
      # ! Note this does conv, norm, gelu, dropout. while fairseq does conv, dropout, norm, gelu
      # Also fairseq layernorm is forced to fp32
      self.extractor = ConvolutionFrontEnd(
          (
              None,
              16000,
              1,
          ),
          num_blocks=num_blocks,
          num_layers_per_block=1,
          out_channels=out_channels,
          kernel_sizes=kernel_sizes,
          strides=strides,
          dilations=[1] * num_blocks,
          residuals=[False] * num_blocks,
          conv_module=Conv1d,
          activation=nn.GELU,
          norm=LayerNorm,
          dropout=dropout,
          conv_bias=False,
          padding="valid",
          conv_init=conv_init,
      )
      self.norm = nn.LayerNorm(out_channels[-1])
  
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 1 to create a new W2VLatentExtractor object from inherited base classes: nn with example: obj = W2VLatentExtractor(out_channels, kernel_sizes, strides, dropout, conv_init)