class_docstr: An implementation of convolution block with 1d or 2d convolutions (depthwise).
  
  Arguments
  ----------
  out_channels : int
      Number of output channels of this model (default 640).
  kernel_size : int
      Kernel size of convolution layers (default 3).
  strides : int
      Striding factor for this block (default 1).
  num_layers : int
      Number of depthwise convolution layers for this block.
  activation : torch class
      Activation function for this block.
  norm : torch class
      Normalization to regularize the model (default BatchNorm1d).
  residuals: bool
      Whether apply residual connection at this block (default None).
  
  Example
  -------
  >>> x = torch.rand((8, 30, 10))
  >>> conv = ConvBlock(2, 16, input_shape=x.shape)
  >>> out = conv(x)
  >>> x.shape
  torch.Size([8, 30, 10])
class_docstr_tok: ["An","implementation","of","convolution","block","with","1d","or","2d","convolutions","(","depthwise",")",".","Arguments","--","--","--","--","--","out_channels",":","int","Number","of","output","channels","of","this","model","(","default","640",")",".","kernel_size",":","int","Kernel","size","of","convolution","layers","(","default","3",")",".","strides",":","int","Striding","factor","for","this","block","(","default","1",")",".","num_layers",":","int","Number","of","depthwise","convolution","layers","for","this","block",".","activation",":","torch","class","Activation","function","for","this","block",".","norm",":","torch","class","Normalization","to","regularize","the","model","(","default","BatchNorm1d",")",".","residuals",":","bool","Whether","apply","residual","connection","at","this","block","(","default","None",")",".","Example","--","--","--","-",">",">",">","x","=","torch.rand","(","(","8",",","30",",","10",")",")",">",">",">","conv","=","ConvBlock","(","2",",","16",",","input_shape=x.shape",")",">",">",">","out","=","conv","(","x",")",">",">",">","x.shape","torch.Size","(","[","8",",","30",",","10","]",")"]
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."""
      out = self.convs(x)
      if self.reduce_conv:
          out = out + self.reduce_conv(x)
          out = self.drop(out)
      return out
  
file_path: speechbrain/speechbrain/lobes/models/convolution.py
imports: import torch
  from speechbrain.nnet.CNN import Conv2d, Conv1d
  from speechbrain.nnet.containers import Sequential
  from speechbrain.nnet.normalization import LayerNorm
label_desc: Use image node_id 2 for calling the ConvBlock obj's underlying member method code with example usage: obj.forward(x) and returns: out