class_docstr: Conformer convolution module.
  
  Args:
      input_dim (int): input dimension.
      num_channels (int): number of depthwise convolution layer input channels.
      depthwise_kernel_size (int): kernel size of depthwise convolution layer.
      dropout (float, optional): dropout probability. (Default: 0.0)
      bias (bool, optional): indicates whether to add bias term to each convolution layer. (Default: ``False``)
      use_group_norm (bool, optional): use GroupNorm rather than BatchNorm. (Default: ``False``)
class_docstr_tok: ["Conformer","convolution","module",".","Args",":","input_dim","(","int",")",":","input","dimension",".","num_channels","(","int",")",":","number","of","depthwise","convolution","layer","input","channels",".","depthwise_kernel_size","(","int",")",":","kernel","size","of","depthwise","convolution","layer",".","dropout","(","float",",","optional",")",":","dropout","probability",".","(","Default",":","0.0",")","bias","(","bool",",","optional",")",":","indicates","whether","to","add","bias","term","to","each","convolution","layer",".","(","Default",":","``","False","``",")","use_group_norm","(","bool",",","optional",")",":","use","GroupNorm","rather","than","BatchNorm",".","(","Default",":","``","False","``",")"]
code: def __init__(
      self,
      input_dim: int,
      num_channels: int,
      depthwise_kernel_size: int,
      dropout: float = 0.0,
      bias: bool = False,
      use_group_norm: bool = False,
  ) -> None:
      super().__init__()
      if (depthwise_kernel_size - 1) % 2 != 0:
          raise ValueError(
              "depthwise_kernel_size must be odd to achieve 'SAME' padding."
          )
      self.layer_norm = torch.nn.LayerNorm(input_dim)
      self.sequential = torch.nn.Sequential(
          torch.nn.Conv1d(
              input_dim,
              2 * num_channels,
              1,
              stride=1,
              padding=0,
              bias=bias,
          ),
          torch.nn.GLU(dim=1),
          torch.nn.Conv1d(
              num_channels,
              num_channels,
              depthwise_kernel_size,
              stride=1,
              padding=(depthwise_kernel_size - 1) // 2,
              groups=num_channels,
              bias=bias,
          ),
          torch.nn.GroupNorm(num_groups=1, num_channels=num_channels)
          if use_group_norm
          else torch.nn.BatchNorm1d(num_channels),
          torch.nn.SiLU(),
          torch.nn.Conv1d(
              num_channels,
              input_dim,
              kernel_size=1,
              stride=1,
              padding=0,
              bias=bias,
          ),
          torch.nn.Dropout(dropout),
      )
  
imports: from typing import Optional, Tuple
  import torch
label_desc: Use image node_id 1 to create a new _ConvolutionModule object from inherited base classes: torch.nn with example: obj = _ConvolutionModule(input_dim, num_channels, depthwise_kernel_size, dropout, bias, use_group_norm)