class_docstr: Implementation of `SparseInst <https://arxiv.org/abs/1912.02424>`_
  
  Args:
      data_preprocessor (:obj:`ConfigDict` or dict, optional): Config of
          :class:`DetDataPreprocessor` to process the input data.
          Defaults to None.
      backbone (:obj:`ConfigDict` or dict): The backbone module.
      encoder (:obj:`ConfigDict` or dict): The encoder module.
      decoder (:obj:`ConfigDict` or dict): The decoder module.
      criterion (:obj:`ConfigDict` or dict, optional): The training matcher
          and losses. Defaults to None.
      test_cfg (:obj:`ConfigDict` or dict, optional): The testing config
          of SparseInst. Defaults to None.
      init_cfg (:obj:`ConfigDict` or dict, optional): the config to control
          the initialization. Defaults to None.
class_docstr_tok: ["Implementation","of","`","SparseInst","<","https",":","\/\/arxiv.org\/abs\/1912.02424",">","`","_","Args",":","data_preprocessor","(",":","obj",":","`","ConfigDict","`","or","dict",",","optional",")",":","Config","of",":","class",":","`","DetDataPreprocessor","`","to","process","the","input","data",".","Defaults","to","None",".","backbone","(",":","obj",":","`","ConfigDict","`","or","dict",")",":","The","backbone","module",".","encoder","(",":","obj",":","`","ConfigDict","`","or","dict",")",":","The","encoder","module",".","decoder","(",":","obj",":","`","ConfigDict","`","or","dict",")",":","The","decoder","module",".","criterion","(",":","obj",":","`","ConfigDict","`","or","dict",",","optional",")",":","The","training","matcher","and","losses",".","Defaults","to","None",".","test_cfg","(",":","obj",":","`","ConfigDict","`","or","dict",",","optional",")",":","The","testing","config","of","SparseInst",".","Defaults","to","None",".","init_cfg","(",":","obj",":","`","ConfigDict","`","or","dict",",","optional",")",":","the","config","to","control","the","initialization",".","Defaults","to","None","."]
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[list]: 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","[","list","]",":","A","tuple","of","features","from","``","bbox_head","``","forward","."]
code: def _forward(
      self,
      batch_inputs: Tensor,
      batch_data_samples: OptSampleList = None,
  ) -> Tuple[List[Tensor]]:
      """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[list]: A tuple of features from ``bbox_head`` forward.
      """
      x = self.backbone(batch_inputs)
      x = self.encoder(x)
      results = self.decoder(x)
      return results
  
file_path: mmdetection/projects/SparseInst/sparseinst/sparseinst.py
imports: from typing import List, Tuple, Union
  import torch
  import torch.nn.functional
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.models import BaseDetector
  from mmdet.models.utils import unpack_gt_instances
  from mmdet.registry import MODELS
  from mmdet.structures import OptSampleList, SampleList
  from mmdet.utils import ConfigType, OptConfigType
label_desc: Use image node_id 2 for calling the SparseInst obj's underlying member method code with example usage: obj._forward(batch_inputs, batch_data_samples) and returns: results