class_docstr: An implementation of ResNet
  
  Arguments
  ---------
  device : str
      Device used, e.g., "cpu" or "cuda".
  activation : torch class
      A class for constructing the activation layers.
  channels : list of ints
      List of number of channels used per stage.
  block_sizes : list of ints
      List of number of groups created per stage.
  strides : list of ints
      List of stride per stage.
  lin_neurons : int
      Number of neurons in linear layers.
  
  Example
  -------
  >>> input_feats = torch.rand([2, 400, 80])
  >>> compute_embedding = ResNet(lin_neurons=256)
  >>> outputs = compute_embedding(input_feats)
  >>> outputs.shape
  torch.Size([2, 256])
docstr: Construct the squeeze-and-excitation block layer.
  
  Arguments
  ---------
  in_channels : int
      Number of input channels.
  out_channels : int
      The number of output channels.
  block_num: int
      Number of ResNet blocks for the network.
  stride : int
      Factor that reduce the spatial dimensionality. Default is 1
docstr_tok: ["Construct","the","squeeze-and-excitation","block","layer",".","Arguments","--","--","--","--","-","in_channels",":","int","Number","of","input","channels",".","out_channels",":","int","The","number","of","output","channels",".","block_num",":","int","Number","of","ResNet","blocks","for","the","network",".","stride",":","int","Factor","that","reduce","the","spatial","dimensionality",".","Default","is","1"]
code: def _make_layer_se(
      self, in_channels, out_channels, block_num, stride=1
  ):
      """Construct the squeeze-and-excitation block layer.
  
      Arguments
      ---------
      in_channels : int
          Number of input channels.
      out_channels : int
          The number of output channels.
      block_num: int
          Number of ResNet blocks for the network.
      stride : int
          Factor that reduce the spatial dimensionality. Default is 1
      """
      downsample = None
      if stride != 1 or in_channels != out_channels:
          downsample = nn.Sequential(
              nn.Conv2d(
                  in_channels,
                  out_channels,
                  kernel_size=1,
                  stride=stride,
                  bias=False,
              ),
              nn.BatchNorm2d(out_channels),
          )
  
      layers = []
      layers.append(
          SEBasicBlock(in_channels, out_channels, 1, stride, downsample)
      )
  
      for i in range(1, block_num):
          layers.append(SEBasicBlock(out_channels, out_channels, 1))
      return nn.Sequential(*layers)
  
imports: import math
  import torch
  import torch.nn
  import torch.nn.functional
  from speechbrain.nnet.normalization import BatchNorm1d
  from speechbrain.nnet.linear import Linear
label_desc: Use image node_id 2 for calling the ResNet obj's underlying member method code with example usage: obj._make_layer_se(in_channels, out_channels, block_num, stride) and returns: nn