class_docstr: ResNet backbone for DetectoRS.
  
  Args:
      sac (dict, optional): Dictionary to construct SAC (Switchable Atrous
          Convolution). Default: None.
      stage_with_sac (list): Which stage to use sac. Default: (False, False,
          False, False).
      rfp_inplanes (int, optional): The number of channels from RFP.
          Default: None. If specified, an additional conv layer will be
          added for ``rfp_feat``. Otherwise, the structure is the same as
          base class.
      output_img (bool): If ``True``, the input image will be inserted into
          the starting position of output. Default: False.
code: def __init__(
      self,
      sac=None,
      stage_with_sac=(False, False, False, False),
      rfp_inplanes=None,
      output_img=False,
      pretrained=None,
      init_cfg=None,
      **kwargs,
  ):
      assert not (
          init_cfg and pretrained
      ), "init_cfg and pretrained cannot be specified at the same time"
      self.pretrained = pretrained
      if init_cfg is not None:
          assert isinstance(
              init_cfg, dict
          ), f"init_cfg must be a dict, but got {type(init_cfg)}"
          if "type" in init_cfg:
              assert (
                  init_cfg.get("type") == "Pretrained"
              ), "Only can initialize module by loading a pretrained model"
          else:
              raise KeyError('`init_cfg` must contain the key "type"')
          self.pretrained = init_cfg.get("checkpoint")
      self.sac = sac
      self.stage_with_sac = stage_with_sac
      self.rfp_inplanes = rfp_inplanes
      self.output_img = output_img
      super(DetectoRS_ResNet, self).__init__(**kwargs)
  
      self.inplanes = self.stem_channels
      self.res_layers = []
      for i, num_blocks in enumerate(self.stage_blocks):
          stride = self.strides[i]
          dilation = self.dilations[i]
          dcn = self.dcn if self.stage_with_dcn[i] else None
          sac = self.sac if self.stage_with_sac[i] else None
          if self.plugins is not None:
              stage_plugins = self.make_stage_plugins(self.plugins, i)
          else:
              stage_plugins = None
          planes = self.base_channels * 2**i
          res_layer = self.make_res_layer(
              block=self.block,
              inplanes=self.inplanes,
              planes=planes,
              num_blocks=num_blocks,
              stride=stride,
              dilation=dilation,
              style=self.style,
              avg_down=self.avg_down,
              with_cp=self.with_cp,
              conv_cfg=self.conv_cfg,
              norm_cfg=self.norm_cfg,
              dcn=dcn,
              sac=sac,
              rfp_inplanes=rfp_inplanes if i > 0 else None,
              plugins=stage_plugins,
          )
          self.inplanes = planes * self.block.expansion
          layer_name = f"layer{i + 1}"
          self.add_module(layer_name, res_layer)
          self.res_layers.append(layer_name)
  
      self._freeze_stages()
  
imports: import torch.nn
  import torch.utils.checkpoint
  from mmcv.cnn import build_conv_layer, build_norm_layer
  from mmengine.logging import MMLogger
  from mmengine.model import Sequential, constant_init, kaiming_init
  from mmengine.runner.checkpoint import load_checkpoint
  from torch.nn.modules.batchnorm import _BatchNorm
  from mmdet.registry import MODELS
  from .resnet import BasicBlock
  from .resnet import Bottleneck
  from .resnet import ResNet
label_desc: Use image node_id 1 to create a new DetectoRS_ResNet object from inherited base classes: ResNet with example: obj = DetectoRS_ResNet(sac, stage_with_sac, rfp_inplanes, output_img, pretrained, init_cfg)