class_docstr: CSPNeXt backbone used in RTMDet.
  
  Args:
      arch (str): Architecture of CSPNeXt, from {P5, P6}.
          Defaults to P5.
      expand_ratio (float): Ratio to adjust the number of channels of the
          hidden layer. Defaults to 0.5.
      deepen_factor (float): Depth multiplier, multiply number of
          blocks in CSP layer by this amount. Defaults to 1.0.
      widen_factor (float): Width multiplier, multiply number of
          channels in each layer by this amount. Defaults to 1.0.
      out_indices (Sequence[int]): Output from which stages.
          Defaults to (2, 3, 4).
      frozen_stages (int): Stages to be frozen (stop grad and set eval
          mode). -1 means not freezing any parameters. Defaults to -1.
      use_depthwise (bool): Whether to use depthwise separable convolution.
          Defaults to False.
      arch_ovewrite (list): Overwrite default arch settings.
          Defaults to None.
      spp_kernel_sizes: (tuple[int]): Sequential of kernel sizes of SPP
          layers. Defaults to (5, 9, 13).
      channel_attention (bool): Whether to add channel attention in each
          stage. Defaults to True.
      conv_cfg (:obj:`ConfigDict` or dict, optional): Config dict for
          convolution layer. Defaults to None.
      norm_cfg (:obj:`ConfigDict` or dict): Dictionary to construct and
          config norm layer. Defaults to dict(type='BN', requires_grad=True).
      act_cfg (:obj:`ConfigDict` or dict): Config dict for activation layer.
          Defaults to dict(type='SiLU').
      norm_eval (bool): Whether to set norm layers to eval mode, namely,
          freeze running stats (mean and var). Note: Effect on Batch Norm
          and its variants only.
      init_cfg (:obj:`ConfigDict` or dict or list[dict] or
          list[:obj:`ConfigDict`]): Initialization config dict.
class_docstr_tok: ["CSPNeXt","backbone","used","in","RTMDet",".","Args",":","arch","(","str",")",":","Architecture","of","CSPNeXt",",","from","{","P5",",","P6","}",".","Defaults","to","P5",".","expand_ratio","(","float",")",":","Ratio","to","adjust","the","number","of","channels","of","the","hidden","layer",".","Defaults","to","0.5.","deepen_factor","(","float",")",":","Depth","multiplier",",","multiply","number","of","blocks","in","CSP","layer","by","this","amount",".","Defaults","to","1.0.","widen_factor","(","float",")",":","Width","multiplier",",","multiply","number","of","channels","in","each","layer","by","this","amount",".","Defaults","to","1.0.","out_indices","(","Sequence","[","int","]",")",":","Output","from","which","stages",".","Defaults","to","(","2",",","3",",","4",")",".","frozen_stages","(","int",")",":","Stages","to","be","frozen","(","stop","grad","and","set","eval","mode",")",".","-1","means","not","freezing","any","parameters",".","Defaults","to","-1.","use_depthwise","(","bool",")",":","Whether","to","use","depthwise","separable","convolution",".","Defaults","to","False",".","arch_ovewrite","(","list",")",":","Overwrite","default","arch","settings",".","Defaults","to","None",".","spp_kernel_sizes",":","(","tuple","[","int","]",")",":","Sequential","of","kernel","sizes","of","SPP","layers",".","Defaults","to","(","5",",","9",",","13",")",".","channel_attention","(","bool",")",":","Whether","to","add","channel","attention","in","each","stage",".","Defaults","to","True",".","conv_cfg","(",":","obj",":","`","ConfigDict","`","or","dict",",","optional",")",":","Config","dict","for","convolution","layer",".","Defaults","to","None",".","norm_cfg","(",":","obj",":","`","ConfigDict","`","or","dict",")",":","Dictionary","to","construct","and","config","norm","layer",".","Defaults","to","dict","(","type='BN","'",",","requires_grad=True",")",".","act_cfg","(",":","obj",":","`","ConfigDict","`","or","dict",")",":","Config","dict","for","activation","layer",".","Defaults","to","dict","(","type='SiLU","'",")",".","norm_eval","(","bool",")",":","Whether","to","set","norm","layers","to","eval","mode",",","namely",",","freeze","running","stats","(","mean","and","var",")",".","Note",":","Effect","on","Batch","Norm","and","its","variants","only",".","init_cfg","(",":","obj",":","`","ConfigDict","`","or","dict","or","list","[","dict","]","or","list","[",":","obj",":","`","ConfigDict","`","]",")",":","Initialization","config","dict","."]
code: def forward(self, x: Tuple[Tensor, ...]) -> Tuple[Tensor, ...]:
      outs = []
      for i, layer_name in enumerate(self.layers):
          layer = getattr(self, layer_name)
          x = layer(x)
          if i in self.out_indices:
              outs.append(x)
      return tuple(outs)
  
file_path: mmdetection/mmdet/models/backbones/cspnext.py
imports: import math
  from typing import Sequence, Tuple
  import torch.nn
  from mmcv.cnn import ConvModule, DepthwiseSeparableConvModule
  from mmengine.model import BaseModule
  from torch import Tensor
  from torch.nn.modules.batchnorm import _BatchNorm
  from mmdet.registry import MODELS
  from mmdet.utils import ConfigType, OptConfigType, OptMultiConfig
  from ..layers import CSPLayer
  from .csp_darknet import SPPBottleneck
label_desc: Use image node_id 4 for calling the CSPNeXt obj's underlying member method code with example usage: obj.forward(x) and returns: tuple