class_docstr: Bbox head used in Double-Head R-CNN
  
  .. code-block:: none
  
                                        /-> cls
                    /-> shared convs ->
                                        \-> reg
      roi features
                                        /-> cls
                    \-> shared fc    ->
                                        \-> reg
class_docstr_tok: ["Bbox","head","used","in","Double-Head","R-CNN","..","code-block",":",":","none","\/-",">","cls","\/-",">","shared","convs","-",">","\\-",">","reg","roi","features","\/-",">","cls","\\-",">","shared","fc","-",">","\\-",">","reg"]
docstr: Forward features from the upstream network.
  
  Args:
      x_cls (Tensor): Classification features of rois
      x_reg (Tensor): Regression features from the upstream network.
  
  Returns:
      tuple: A tuple of classification scores and bbox prediction.
  
          - cls_score (Tensor): Classification score predictions of rois.
            each roi predicts num_classes + 1 channels.
          - bbox_pred (Tensor): BBox deltas predictions of rois. each roi
            predicts 4 * num_classes channels.
docstr_tok: ["Forward","features","from","the","upstream","network",".","Args",":","x_cls","(","Tensor",")",":","Classification","features","of","rois","x_reg","(","Tensor",")",":","Regression","features","from","the","upstream","network",".","Returns",":","tuple",":","A","tuple","of","classification","scores","and","bbox","prediction",".","-","cls_score","(","Tensor",")",":","Classification","score","predictions","of","rois",".","each","roi","predicts","num_classes","+","1","channels",".","-","bbox_pred","(","Tensor",")",":","BBox","deltas","predictions","of","rois",".","each","roi","predicts","4","*","num_classes","channels","."]
code: def forward(self, x_cls: Tensor, x_reg: Tensor) -> Tuple[Tensor]:
      """Forward features from the upstream network.
  
      Args:
          x_cls (Tensor): Classification features of rois
          x_reg (Tensor): Regression features from the upstream network.
  
      Returns:
          tuple: A tuple of classification scores and bbox prediction.
  
              - cls_score (Tensor): Classification score predictions of rois.
                each roi predicts num_classes + 1 channels.
              - bbox_pred (Tensor): BBox deltas predictions of rois. each roi
                predicts 4 * num_classes channels.
      """
      # conv head
      x_conv = self.res_block(x_reg)
  
      for conv in self.conv_branch:
          x_conv = conv(x_conv)
  
      if self.with_avg_pool:
          x_conv = self.avg_pool(x_conv)
  
      x_conv = x_conv.view(x_conv.size(0), -1)
      bbox_pred = self.fc_reg(x_conv)
  
      # fc head
      x_fc = x_cls.view(x_cls.size(0), -1)
      for fc in self.fc_branch:
          x_fc = self.relu(fc(x_fc))
  
      cls_score = self.fc_cls(x_fc)
  
      return cls_score, bbox_pred
  
file_path: mmdetection/mmdet/models/roi_heads/bbox_heads/double_bbox_head.py
imports: from typing import Tuple
  import torch.nn
  from mmcv.cnn import ConvModule
  from mmengine.model import BaseModule, ModuleList
  from torch import Tensor
  from mmdet.models.backbones.resnet import Bottleneck
  from mmdet.registry import MODELS
  from mmdet.utils import ConfigType, MultiConfig, OptConfigType, OptMultiConfig
  from .bbox_head import BBoxHead
label_desc: Use image node_id 4 for calling the DoubleConvFCBBoxHead obj's underlying member method code with example usage: obj.forward(x_cls, x_reg) and returns: cls_score,  bbox_pred