class_docstr: CSP-Darknet backbone used in YOLOv5 and YOLOX.
  
  Args:
      arch (str): Architecture of CSP-Darknet, from {P5, P6}.
          Default: P5.
      deepen_factor (float): Depth multiplier, multiply number of
          blocks in CSP layer by this amount. Default: 1.0.
      widen_factor (float): Width multiplier, multiply number of
          channels in each layer by this amount. Default: 1.0.
      out_indices (Sequence[int]): Output from which stages.
          Default: (2, 3, 4).
      frozen_stages (int): Stages to be frozen (stop grad and set eval
          mode). -1 means not freezing any parameters. Default: -1.
      use_depthwise (bool): Whether to use depthwise separable convolution.
          Default: False.
      arch_ovewrite(list): Overwrite default arch settings. Default: None.
      spp_kernal_sizes: (tuple[int]): Sequential of kernel sizes of SPP
          layers. Default: (5, 9, 13).
      conv_cfg (dict): Config dict for convolution layer. Default: None.
      norm_cfg (dict): Dictionary to construct and config norm layer.
          Default: dict(type='BN', requires_grad=True).
      act_cfg (dict): Config dict for activation layer.
          Default: dict(type='LeakyReLU', negative_slope=0.1).
      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 (dict or list[dict], optional): Initialization config dict.
          Default: None.
  Example:
      >>> from mmdet.models import CSPDarknet
      >>> import torch
      >>> self = CSPDarknet(depth=53)
      >>> self.eval()
      >>> inputs = torch.rand(1, 3, 416, 416)
      >>> level_outputs = self.forward(inputs)
      >>> for level_out in level_outputs:
      ...     print(tuple(level_out.shape))
      ...
      (1, 256, 52, 52)
      (1, 512, 26, 26)
      (1, 1024, 13, 13)
code: def _freeze_stages(self):
      if self.frozen_stages >= 0:
          for i in range(self.frozen_stages + 1):
              m = getattr(self, self.layers[i])
              m.eval()
              for param in m.parameters():
                  param.requires_grad = False
  
imports: import math
  import torch
  import torch.nn
  from mmcv.cnn import ConvModule, DepthwiseSeparableConvModule
  from mmengine.model import BaseModule
  from torch.nn.modules.batchnorm import _BatchNorm
  from mmdet.registry import MODELS
  from ..layers import CSPLayer
label_desc: Use image node_id 2 for calling the CSPDarknet obj's underlying member method code with example usage: obj._freeze_stages() without return types