class_docstr: This class implements the convolutional block used in CNN14
  
  Arguments
  ---------
  in_channels : int
      Number of input channels
  out_channels : int
      Number of output channels
  norm_type : str in ['bn', 'in', 'ln']
      The type of normalization
  
  Example:
  --------
  >>> convblock = ConvBlock(10, 20, 'ln')
  >>> x = torch.rand(5, 10, 20, 30)
  >>> y = convblock(x)
  >>> print(y.shape)
  torch.Size([5, 20, 10, 15])
class_docstr_tok: ["This","class","implements","the","convolutional","block","used","in","CNN14","Arguments","--","--","--","--","-","in_channels",":","int","Number","of","input","channels","out_channels",":","int","Number","of","output","channels","norm_type",":","str","in","[","'bn","'",",","'in","'",",","'ln","'","]","The","type","of","normalization","Example",":","--","--","--","--",">",">",">","convblock","=","ConvBlock","(","10",",","20",",","'ln","'",")",">",">",">","x","=","torch.rand","(","5",",","10",",","20",",","30",")",">",">",">","y","=","convblock","(","x",")",">",">",">","print","(","y.shape",")","torch.Size","(","[","5",",","20",",","10",",","15","]",")"]
code: def __init__(self, in_channels, out_channels, norm_type):
      super(ConvBlock, self).__init__()
      self.conv1 = nn.Conv2d(
          in_channels=in_channels,
          out_channels=out_channels,
          kernel_size=(3, 3),
          stride=(1, 1),
          padding=(1, 1),
          bias=False,
      )
      self.conv2 = nn.Conv2d(
          in_channels=out_channels,
          out_channels=out_channels,
          kernel_size=(3, 3),
          stride=(1, 1),
          padding=(1, 1),
          bias=False,
      )
      self.norm_type = norm_type
  
      if norm_type == "bn":
          self.norm1 = nn.BatchNorm2d(out_channels)
          self.norm2 = nn.BatchNorm2d(out_channels)
      elif norm_type == "in":
          self.norm1 = nn.InstanceNorm2d(
              out_channels, affine=True, track_running_stats=True
          )
          self.norm2 = nn.InstanceNorm2d(
              out_channels, affine=True, track_running_stats=True
          )
      elif norm_type == "ln":
          self.norm1 = nn.GroupNorm(1, out_channels)
          self.norm2 = nn.GroupNorm(1, out_channels)
      else:
          raise ValueError("Unknown norm type {}".format(norm_type))
  
      self.init_weight()
  
file_path: speechbrain/speechbrain/lobes/models/Cnn14.py
imports: import torch.nn
  import torch.nn.functional
  import torch
label_desc: Use image node_id 1 to create a new ConvBlock object from inherited base classes: nn with example: obj = ConvBlock(in_channels, out_channels, norm_type)