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","]",")"]
docstr: Processes the input tensor x and returns an output tensor.
docstr_tok: ["Processes","the","input","tensor","x","and","returns","an","output","tensor","."]
code: def forward(self, x):
      """Processes the input tensor x and returns an output tensor."""
      y = []
      for i, x_i in enumerate(torch.chunk(x, self.scale, dim=1)):
          if i == 0:
              y_i = x_i
          elif i == 1:
              y_i = self.blocks[i - 1](x_i)
          else:
              y_i = self.blocks[i - 1](x_i + y_i)
          y.append(y_i)
      y = torch.cat(y, dim=1)
      return y
  
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 2 for calling the Res2NetBlock obj's underlying member method code with example usage: obj.forward(x) and returns: y