class_docstr: Stage of CascadeRPNHead.
  
  Args:
      in_channels (int): Number of channels in the input feature map.
      anchor_generator (:obj:`ConfigDict` or dict): anchor generator config.
      adapt_cfg (:obj:`ConfigDict` or dict): adaptation config.
      bridged_feature (bool): whether update rpn feature. Defaults to False.
      with_cls (bool): whether use classification branch. Defaults to True.
      init_cfg :obj:`ConfigDict` or list[:obj:`ConfigDict`] or dict or
          list[dict], optional): Initialization config dict.
          Defaults to None.
class_docstr_tok: ["Stage","of","CascadeRPNHead",".","Args",":","in_channels","(","int",")",":","Number","of","channels","in","the","input","feature","map",".","anchor_generator","(",":","obj",":","`","ConfigDict","`","or","dict",")",":","anchor","generator","config",".","adapt_cfg","(",":","obj",":","`","ConfigDict","`","or","dict",")",":","adaptation","config",".","bridged_feature","(","bool",")",":","whether","update","rpn","feature",".","Defaults","to","False",".","with_cls","(","bool",")",":","whether","use","classification","branch",".","Defaults","to","True",".","init_cfg",":","obj",":","`","ConfigDict","`","or","list","[",":","obj",":","`","ConfigDict","`","]","or","dict","or","list","[","dict","]",",","optional",")",":","Initialization","config","dict",".","Defaults","to","None","."]
docstr: Init layers of a CascadeRPN stage.
docstr_tok: ["Init","layers","of","a","CascadeRPN","stage","."]
code: def _init_layers(self) -> None:
      """Init layers of a CascadeRPN stage."""
      adapt_cfg = copy.deepcopy(self.adapt_cfg)
      adapt_cfg["adapt_type"] = adapt_cfg.pop("type")
      self.rpn_conv = AdaptiveConv(
          self.in_channels, self.feat_channels, **adapt_cfg
      )
      if self.with_cls:
          self.rpn_cls = nn.Conv2d(
              self.feat_channels,
              self.num_anchors * self.cls_out_channels,
              1,
          )
      self.rpn_reg = nn.Conv2d(
          self.feat_channels, self.num_anchors * 4, 1
      )
      self.relu = nn.ReLU(inplace=True)
  
imports: from __future__ import division
  import copy
  from typing import Dict, List, Optional, Tuple, Union
  import torch
  import torch.nn
  from mmcv.ops import DeformConv2d
  from mmengine.config import ConfigDict
  from mmengine.model import BaseModule, ModuleList
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.registry import MODELS, TASK_UTILS
  from mmdet.structures import SampleList
  from mmdet.utils import ConfigType, InstanceList, MultiConfig, OptInstanceList, OptMultiConfig
  from ..task_modules.assigners import RegionAssigner
  from ..task_modules.samplers import PseudoSampler
  from ..utils import images_to_levels, multi_apply, select_single_mlvl, unpack_gt_instances
  from .base_dense_head import BaseDenseHead
  from .rpn_head import RPNHead
label_desc: Use image node_id 2 for calling the StageCascadeRPNHead obj's underlying member method code with example usage: obj._init_layers() without return types