class_docstr: Args:
      in_channels (int): Number of channels of input image tensor.
      stem_channels (list[int]): List of channels in each stem layer. E.g.,
          [64, 128] stands for 64 and 128 channels in the first and second
          stem layers.
      block_cfgs (dict): Configs of block
      arch_layers (list[int]): List of Block number for each stage.
      arch_channels (list[int]): List of channels for each stage.
      strides (Sequence[int] or Sequence[tuple]): Strides of the first block
          of each stage.
      out_indices (Sequence[int], optional): Indices of output stages. If not
          specified, only the last stage will be returned.
      plugins (dict, optional): Configs of stage plugins
      init_cfg (dict or list[dict], optional): Initialization config dict.
class_docstr_tok: ["Args",":","in_channels","(","int",")",":","Number","of","channels","of","input","image","tensor",".","stem_channels","(","list","[","int","]",")",":","List","of","channels","in","each","stem","layer",".","E.g.",",","[","64",",","128","]","stands","for","64","and","128","channels","in","the","first","and","second","stem","layers",".","block_cfgs","(","dict",")",":","Configs","of","block","arch_layers","(","list","[","int","]",")",":","List","of","Block","number","for","each","stage",".","arch_channels","(","list","[","int","]",")",":","List","of","channels","for","each","stage",".","strides","(","Sequence","[","int","]","or","Sequence","[","tuple","]",")",":","Strides","of","the","first","block","of","each","stage",".","out_indices","(","Sequence","[","int","]",",","optional",")",":","Indices","of","output","stages",".","If","not","specified",",","only","the","last","stage","will","be","returned",".","plugins","(","dict",",","optional",")",":","Configs","of","stage","plugins","init_cfg","(","dict","or","list","[","dict","]",",","optional",")",":","Initialization","config","dict","."]
docstr: Build resnet layer.
  
  Args:
      block_cfgs (dict): Configs of blocks.
      inplanes (int): Number of input channels.
      planes (int): Number of output channels.
      blocks (int): Number of blocks.
      stride (int): Stride of the first block.
  
  Returns:
      Sequential: A sequence of blocks.
docstr_tok: ["Build","resnet","layer",".","Args",":","block_cfgs","(","dict",")",":","Configs","of","blocks",".","inplanes","(","int",")",":","Number","of","input","channels",".","planes","(","int",")",":","Number","of","output","channels",".","blocks","(","int",")",":","Number","of","blocks",".","stride","(","int",")",":","Stride","of","the","first","block",".","Returns",":","Sequential",":","A","sequence","of","blocks","."]
code: def _make_layer(
      self,
      block_cfgs: Dict,
      inplanes: int,
      planes: int,
      blocks: int,
      stride: int,
  ) -> Sequential:
      """Build resnet layer.
  
      Args:
          block_cfgs (dict): Configs of blocks.
          inplanes (int): Number of input channels.
          planes (int): Number of output channels.
          blocks (int): Number of blocks.
          stride (int): Stride of the first block.
  
      Returns:
          Sequential: A sequence of blocks.
      """
      layers = []
      downsample = None
      block_cfgs_ = block_cfgs.copy()
      if isinstance(stride, int):
          stride = (stride, stride)
  
      if stride[0] != 1 or stride[1] != 1 or inplanes != planes:
          downsample = ConvModule(
              inplanes,
              planes,
              1,
              stride,
              norm_cfg=dict(type="BN"),
              act_cfg=None,
          )
  
      if block_cfgs_["type"] == "BasicBlock":
          block = BasicBlock
          block_cfgs_.pop("type")
      else:
          raise ValueError("{} not implement yet".format(block["type"]))
  
      layers.append(
          block(
              inplanes,
              planes,
              stride=stride,
              downsample=downsample,
              **block_cfgs_,
          )
      )
      inplanes = planes
      for _ in range(1, blocks):
          layers.append(block(inplanes, planes, **block_cfgs_))
  
      return Sequential(*layers)
  
file_path: mmocr/mmocr/models/textrecog/backbones/resnet.py
imports: from typing import Dict, List, Optional, Tuple, Union
  import torch
  from mmcv.cnn import ConvModule, build_plugin_layer
  from mmengine.model import BaseModule, Sequential
  import mmocr.utils
  from mmocr.models.textrecog.layers import BasicBlock
  from mmocr.registry import MODELS
label_desc: Use image node_id 2 for calling the ResNet obj's underlying member method code with example usage: obj._make_layer(block_cfgs, inplanes, planes, blocks, stride) and returns: Sequential