class_docstr: Implementation of `TridentNet <https://arxiv.org/abs/1901.01892>`_
class_docstr_tok: ["Implementation","of","`","TridentNet","<","https",":","\/\/arxiv.org\/abs\/1901.01892",">","`","_"]
docstr: copy the ``batch_data_samples`` to fit multi-branch.
docstr_tok: ["copy","the","``","batch_data_samples","``","to","fit","multi-branch","."]
code: def predict(
      self,
      batch_inputs: Tensor,
      batch_data_samples: SampleList,
      rescale: bool = True,
  ) -> SampleList:
      """copy the ``batch_data_samples`` to fit multi-branch."""
      num_branch = (
          self.num_branch
          if self.training or self.test_branch_idx == -1
          else 1
      )
      trident_data_samples = batch_data_samples * num_branch
      return super().predict(
          batch_inputs=batch_inputs,
          batch_data_samples=trident_data_samples,
          rescale=rescale,
      )
  
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 4 for calling the TridentFasterRCNN obj's underlying member method code with example usage: obj.predict(batch_inputs, batch_data_samples, rescale) and returns: super