class_docstr: This function implements 2d convolution.
  
  Arguments
  ---------
  out_channels : int
      It is the number of output channels.
  kernel_size : tuple
      Kernel size of the 2d convolutional filters over time and frequency
      axis.
  input_shape : tuple
      The shape of the input. Alternatively use ``in_channels``.
  in_channels : int
      The number of input channels. Alternatively use ``input_shape``.
  stride: int
      Stride factor of the 2d convolutional filters over time and frequency
      axis.
  dilation : int
      Dilation factor of the 2d convolutional filters over time and
      frequency axis.
  padding : str
      (same, valid, causal).
      If "valid", no padding is performed.
      If "same" and stride is 1, output shape is same as input shape.
      If "causal" then proper padding is inserted to simulate causal convolution on the first spatial dimension.
      (spatial dim 1 is dim 3 for both skip_transpose=False and skip_transpose=True)
  padding_mode : str
      This flag specifies the type of padding. See torch.nn documentation
      for more information.
  groups : int
      This option specifies the convolutional groups. See torch.nn
      documentation for more information.
  bias : bool
      If True, the additive bias b is adopted.
  max_norm: float
      kernel max-norm.
  swap: bool
      If True, the convolution is done with the format (B, C, W, H).
      If False, the convolution is dine with (B, H, W, C).
      Active only if skip_transpose is False.
  skip_transpose : bool
      If False, uses batch x spatial.dim2 x spatial.dim1 x channel convention of speechbrain.
      If True, uses batch x channel x spatial.dim1 x spatial.dim2 convention.
  weight_norm : bool
      If True, use weight normalization,
      to be removed with self.remove_weight_norm() at inference
  conv_init : str
      Weight initialization for the convolution network
  
  Example
  -------
  >>> inp_tensor = torch.rand([10, 40, 16, 8])
  >>> cnn_2d = Conv2d(
  ...     input_shape=inp_tensor.shape, out_channels=5, kernel_size=(7, 3)
  ... )
  >>> out_tensor = cnn_2d(inp_tensor)
  >>> out_tensor.shape
  torch.Size([10, 40, 16, 5])
docstr: Removes weight normalization at inference if used during training.
docstr_tok: ["Removes","weight","normalization","at","inference","if","used","during","training","."]
code: def remove_weight_norm(self):
      """Removes weight normalization at inference if used during training."""
      self.conv = nn.utils.remove_weight_norm(self.conv)
  
imports: import math
  import torch
  import logging
  import numpy
  import torch.nn
  import torch.nn.functional
  import torchaudio
  from typing import Tuple
  from speechbrain.processing.signal_processing import gabor_impulse_response, gabor_impulse_response_legacy_complex
label_desc: Use image node_id 5 for calling the Conv2d obj's underlying member method code with example usage: obj.remove_weight_norm() without return types