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: Args: x (Tensor): Image tensor of shape :math:`(N, 3, H, W)`.
  
  Returns:
      Tensor or list[Tensor]: Feature tensor. 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",".","It","can","be","a","list","of","feature","outputs","at","specific","layers","if","``","out_indices","``","is","specified","."]
code: def forward(
      self, x: torch.Tensor
  ) -> Union[torch.Tensor, List[torch.Tensor]]:
      """
      Args: x (Tensor): Image tensor of shape :math:`(N, 3, H, W)`.
  
      Returns:
          Tensor or list[Tensor]: Feature tensor. It can be a list of
          feature outputs at specific layers if ``out_indices`` is specified.
      """
      x = self.stem_layers(x)
  
      outs = []
      for i, layer_name in enumerate(self.res_layers):
          res_layer = getattr(self, layer_name)
          if not self.use_plugins:
              x = res_layer(x)
              if self.out_indices and i in self.out_indices:
                  outs.append(x)
          else:
              x = self.forward_plugin(x, self.plugin_ahead_names[i])
              x = res_layer(x)
              x = self.forward_plugin(x, self.plugin_after_names[i])
              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.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 6 for calling the ResNet obj's underlying member method code with example usage: obj.forward(x) and returns: unknown