class_docstr: Implementation of `Grid RoI Head <https://arxiv.org/abs/1811.12030>`_
  
  Args:
      grid_roi_extractor (:obj:`ConfigDict` or dict): Config of
          roi extractor.
      grid_head (:obj:`ConfigDict` or dict): Config of grid head
class_docstr_tok: ["Implementation","of","`","Grid","RoI","Head","<","https",":","\/\/arxiv.org\/abs\/1811.12030",">","`","_","Args",":","grid_roi_extractor","(",":","obj",":","`","ConfigDict","`","or","dict",")",":","Config","of","roi","extractor",".","grid_head","(",":","obj",":","`","ConfigDict","`","or","dict",")",":","Config","of","grid","head"]
code: def __init__(
      self,
      grid_roi_extractor: ConfigType,
      grid_head: ConfigType,
      **kwargs,
  ) -> None:
      assert grid_head is not None
      super().__init__(**kwargs)
      if grid_roi_extractor is not None:
          self.grid_roi_extractor = MODELS.build(grid_roi_extractor)
          self.share_roi_extractor = False
      else:
          self.share_roi_extractor = True
          self.grid_roi_extractor = self.bbox_roi_extractor
      self.grid_head = MODELS.build(grid_head)
  
file_path: mmdetection/mmdet/models/roi_heads/grid_roi_head.py
imports: from typing import List, Optional, Tuple
  import torch
  from torch import Tensor
  from mmdet.registry import MODELS
  from mmdet.structures import SampleList
  from mmdet.structures.bbox import bbox2roi
  from mmdet.utils import ConfigType, InstanceList
  from ..task_modules.samplers import SamplingResult
  from ..utils.misc import unpack_gt_instances
  from .standard_roi_head import StandardRoIHead
label_desc: Use image node_id 1 to create a new GridRoIHead object from inherited base classes: StandardRoIHead with example: obj = GridRoIHead(grid_roi_extractor, grid_head)