class_docstr: An implementation of Res2NetBlock w/ dilation.
  
  Arguments
  ---------
  in_channels : int
      The number of channels expected in the input.
  out_channels : int
      The number of output channels.
  scale : int
      The scale of the Res2Net block.
  kernel_size: int
      The kernel size of the Res2Net block.
  dilation : int
      The dilation of the Res2Net block.
  
  Example
  -------
  >>> inp_tensor = torch.rand([8, 120, 64]).transpose(1, 2)
  >>> layer = Res2NetBlock(64, 64, scale=4, dilation=3)
  >>> out_tensor = layer(inp_tensor).transpose(1, 2)
  >>> out_tensor.shape
  torch.Size([8, 120, 64])
class_docstr_tok: ["An","implementation","of","Res2NetBlock","w\/","dilation",".","Arguments","--","--","--","--","-","in_channels",":","int","The","number","of","channels","expected","in","the","input",".","out_channels",":","int","The","number","of","output","channels",".","scale",":","int","The","scale","of","the","Res2Net","block",".","kernel_size",":","int","The","kernel","size","of","the","Res2Net","block",".","dilation",":","int","The","dilation","of","the","Res2Net","block",".","Example","--","--","--","-",">",">",">","inp_tensor","=","torch.rand","(","[","8",",","120",",","64","]",")",".transpose","(","1",",","2",")",">",">",">","layer","=","Res2NetBlock","(","64",",","64",",","scale=4",",","dilation=3",")",">",">",">","out_tensor","=","layer","(","inp_tensor",")",".transpose","(","1",",","2",")",">",">",">","out_tensor.shape","torch.Size","(","[","8",",","120",",","64","]",")"]
code: def __init__(
      self,
      in_channels,
      out_channels,
      scale=8,
      kernel_size=3,
      dilation=1,
  ):
      super(Res2NetBlock, self).__init__()
      assert in_channels % scale == 0
      assert out_channels % scale == 0
  
      in_channel = in_channels // scale
      hidden_channel = out_channels // scale
  
      self.blocks = nn.ModuleList(
          [
              TDNNBlock(
                  in_channel,
                  hidden_channel,
                  kernel_size=kernel_size,
                  dilation=dilation,
              )
              for i in range(scale - 1)
          ]
      )
      self.scale = scale
  
imports: import torch
  import torch.nn
  import torch.nn.functional
  from speechbrain.dataio.dataio import length_to_mask
  from speechbrain.nnet.CNN import Conv1d
  from speechbrain.nnet.normalization import BatchNorm1d
  from speechbrain.nnet.linear import Linear
label_desc: Use image node_id 1 to create a new Res2NetBlock object from inherited base classes: torch.nn with example: obj = Res2NetBlock(in_channels, out_channels, scale, kernel_size, dilation)