class_docstr: This class implements the `ResNet architecture <https://arxiv.org/pdf/1512.03385.pdf>`_
  
  .. note::
      Our ResNet implementation is different from the original implementation in two ways:
      1. First 7x7 strided conv is replaced with 3x3 strided conv
      2. MaxPool operation is replaced with another 3x3 strided depth-wise conv
code: def _make_layer(
      self,
      opts: argparse.Namespace,
      in_channels: int,
      layer_config: Dict,
      stochastic_depth_probs: List[float],
      dilate: bool = False,
      *args,
      **kwargs,
  ) -> Tuple[nn.Sequential, int]:
      block_type = (
          BottleneckResNetBlock
          if layer_config.get("block_type", "bottleneck").lower()
          == "bottleneck"
          else BasicResNetBlock
      )
      mid_channels = layer_config.get("mid_channels")
      num_blocks = layer_config.get("num_blocks", 2)
      stride = layer_config.get("stride", 1)
  
      squeeze_channels = layer_config.get("squeeze_channels", None)
  
      previous_dilation = self.dilation
      if dilate:
          self.dilation *= stride
          stride = 1
  
      out_channels = block_type.expansion * mid_channels
      dropout = getattr(opts, "model.classification.resnet.dropout")
  
      block = nn.Sequential()
      block.add_module(
          name="block_0",
          module=block_type(
              opts=opts,
              in_channels=in_channels,
              mid_channels=mid_channels,
              out_channels=out_channels,
              stride=stride,
              dilation=previous_dilation,
              dropout=dropout,
              stochastic_depth_prob=stochastic_depth_probs[0],
              squeeze_channels=squeeze_channels,
          ),
      )
  
      for block_idx in range(1, num_blocks):
          block.add_module(
              name="block_{}".format(block_idx),
              module=block_type(
                  opts=opts,
                  in_channels=out_channels,
                  mid_channels=mid_channels,
                  out_channels=out_channels,
                  stride=1,
                  dilation=self.dilation,
                  dropout=dropout,
                  stochastic_depth_prob=stochastic_depth_probs[
                      block_idx
                  ],
                  squeeze_channels=squeeze_channels,
              ),
          )
  
      return block, out_channels
  
file_path: ml-cvnets/cvnets/models/classification/resnet.py
imports: import argparse
  from functools import partial
  from typing import Dict, List, Tuple
  import numpy
  from torch import nn
  from cvnets.layers import ConvLayer2d, Dropout, GlobalPool, Identity, LinearLayer
  from cvnets.models import MODEL_REGISTRY
  from cvnets.models.classification.base_image_encoder import BaseImageEncoder
  from cvnets.models.classification.config.resnet import get_configuration
  from cvnets.modules import BasicResNetBlock, BottleneckResNetBlock
label_desc: Use image node_id 3 for calling the ResNet obj's underlying member method code with example usage: obj._make_layer(opts, in_channels, layer_config, stochastic_depth_probs, dilate) and returns: block,  out_channels