class_docstr: Implement ResNet backbone for text recognition, modified from `ResNet.
  
  <https://arxiv.org/pdf/1512.03385.pdf>`_ and
  `<https://github.com/FangShancheng/ABINet>`_
  
  Args:
      in_channels (int): Number of channels of input image tensor.
      stem_channels (int): Number of stem channels.
      base_channels (int): Number of base channels.
      arch_settings  (list[int]): List of BasicBlock number for each stage.
      strides (Sequence[int]): Strides of the first block of each stage.
      out_indices (None | Sequence[int]): Indices of output stages. If not
          specified, only the last stage will be returned.
      last_stage_pool (bool): If True, add `MaxPool2d` layer to last stage.
docstr: Args:
      x (Tensor): Image tensor of shape :math:`(N, 3, H, W)`.
  
  Returns:
      Tensor or list[Tensor]: Feature tensor. Its shape depends on
      ResNetABI's config. It can be a list of feature outputs at specific
      layers if ``out_indices`` is specified.
docstr_tok: ["Args",":","x","(","Tensor",")",":","Image","tensor","of","shape",":","math",":","`","(","N",",","3",",","H",",","W",")","`",".","Returns",":","Tensor","or","list","[","Tensor","]",":","Feature","tensor",".","Its","shape","depends","on","ResNetABI","'s","config",".","It","can","be","a","list","of","feature","outputs","at","specific","layers","if","``","out_indices","``","is","specified","."]
code: def forward(self, x):
      """
      Args:
          x (Tensor): Image tensor of shape :math:`(N, 3, H, W)`.
  
      Returns:
          Tensor or list[Tensor]: Feature tensor. Its shape depends on
          ResNetABI's config. It can be a list of feature outputs at specific
          layers if ``out_indices`` is specified.
      """
  
      x = self.conv1(x)
      x = self.bn1(x)
      x = self.relu1(x)
  
      outs = []
      for i, layer_name in enumerate(self.res_layers):
          res_layer = getattr(self, layer_name)
          x = res_layer(x)
          if self.out_indices and i in self.out_indices:
              outs.append(x)
  
      return tuple(outs) if self.out_indices else x
  
file_path: mmocr/mmocr/models/textrecog/backbones/resnet_abi.py
imports: import torch.nn
  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 4 for calling the ResNetABI obj's underlying member method code with example usage: obj.forward(x) and returns: unknown