class_docstr: Implementation of `TridentNet <https://arxiv.org/abs/1901.01892>`_
class_docstr_tok: ["Implementation","of","`","TridentNet","<","https",":","\/\/arxiv.org\/abs\/1901.01892",">","`","_"]
code: def __init__(
      self,
      backbone: ConfigType,
      rpn_head: ConfigType,
      roi_head: ConfigType,
      train_cfg: ConfigType,
      test_cfg: ConfigType,
      neck: OptConfigType = None,
      data_preprocessor: OptConfigType = None,
      init_cfg: OptMultiConfig = None,
  ) -> None:
      super().__init__(
          backbone=backbone,
          neck=neck,
          rpn_head=rpn_head,
          roi_head=roi_head,
          train_cfg=train_cfg,
          test_cfg=test_cfg,
          data_preprocessor=data_preprocessor,
          init_cfg=init_cfg,
      )
      assert self.backbone.num_branch == self.roi_head.num_branch
      assert (
          self.backbone.test_branch_idx == self.roi_head.test_branch_idx
      )
      self.num_branch = self.backbone.num_branch
      self.test_branch_idx = self.backbone.test_branch_idx
  
file_path: mmdetection/mmdet/models/detectors/trident_faster_rcnn.py
imports: from torch import Tensor
  from mmdet.registry import MODELS
  from mmdet.structures import SampleList
  from mmdet.utils import ConfigType, OptConfigType, OptMultiConfig
  from .faster_rcnn import FasterRCNN
label_desc: Use image node_id 1 to create a new TridentFasterRCNN object from inherited base classes: FasterRCNN with example: obj = TridentFasterRCNN(backbone, rpn_head, roi_head, train_cfg, test_cfg, neck, data_preprocessor, init_cfg)