class_docstr: Base class for single-stage instance segmentors.
class_docstr_tok: ["Base","class","for","single-stage","instance","segmentors","."]
docstr: Network forward process. Usually includes backbone, neck and head
  forward without any post-processing.
  
   Args:
      batch_inputs (Tensor): Inputs with shape (N, C, H, W).
  
  Returns:
      tuple: A tuple of features from ``bbox_head`` forward.
docstr_tok: ["Network","forward","process",".","Usually","includes","backbone",",","neck","and","head","forward","without","any","post-processing",".","Args",":","batch_inputs","(","Tensor",")",":","Inputs","with","shape","(","N",",","C",",","H",",","W",")",".","Returns",":","tuple",":","A","tuple","of","features","from","``","bbox_head","``","forward","."]
code: def _forward(
      self,
      batch_inputs: Tensor,
      batch_data_samples: OptSampleList = None,
      **kwargs,
  ) -> tuple:
      """Network forward process. Usually includes backbone, neck and head
      forward without any post-processing.
  
       Args:
          batch_inputs (Tensor): Inputs with shape (N, C, H, W).
  
      Returns:
          tuple: A tuple of features from ``bbox_head`` forward.
      """
      outs = ()
      # backbone
      x = self.extract_feat(batch_inputs)
      # bbox_head
      positive_infos = None
      if self.with_bbox:
          assert batch_data_samples is not None
          bbox_outs = self.bbox_head.forward(x)
          outs = outs + (bbox_outs,)
          # It is necessary to use `bbox_head.loss` to update
          # `_raw_positive_infos` which will be used in `get_positive_infos`
          # positive_infos will be used in the following mask head.
          _ = self.bbox_head.loss(x, batch_data_samples, **kwargs)
          positive_infos = self.bbox_head.get_positive_infos()
      # mask_head
      if positive_infos is None:
          mask_outs = self.mask_head.forward(x)
      else:
          mask_outs = self.mask_head.forward(x, positive_infos)
      outs = outs + (mask_outs,)
      return outs
  
file_path: mmdetection/mmdet/models/detectors/single_stage_instance_seg.py
imports: import copy
  from typing import Tuple
  from torch import Tensor
  from mmdet.registry import MODELS
  from mmdet.structures import OptSampleList, SampleList
  from mmdet.utils import ConfigType, OptConfigType, OptMultiConfig
  from .base import BaseDetector
label_desc: Use image node_id 3 for calling the SingleStageInstanceSegmentor obj's underlying member method code with example usage: obj._forward(batch_inputs, batch_data_samples) and returns: outs