class_docstr: RPNHead in the `Sparse R-CNN <https://arxiv.org/abs/2011.12450>`_ .
  
  Unlike traditional RPNHead, this module does not need FPN input, but just
  decode `init_proposal_bboxes` and expand the first dimension of
  `init_proposal_bboxes` and `init_proposal_features` to the batch_size.
  
  Args:
      num_proposals (int): Number of init_proposals. Defaults to 100.
      proposal_feature_channel (int): Channel number of
          init_proposal_feature. Defaults to 256.
      init_cfg (:obj:`ConfigDict` or dict or list[:obj:`ConfigDict` or             dict]): Initialization config dict. Defaults to None.
class_docstr_tok: ["RPNHead","in","the","`","Sparse","R-CNN","<","https",":","\/\/arxiv.org\/abs\/2011.12450",">","`","_",".","Unlike","traditional","RPNHead",",","this","module","does","not","need","FPN","input",",","but","just","decode","`","init_proposal_bboxes","`","and","expand","the","first","dimension","of","`","init_proposal_bboxes","`","and","`","init_proposal_features","`","to","the","batch_size",".","Args",":","num_proposals","(","int",")",":","Number","of","init_proposals",".","Defaults","to","100.","proposal_feature_channel","(","int",")",":","Channel","number","of","init_proposal_feature",".","Defaults","to","256.","init_cfg","(",":","obj",":","`","ConfigDict","`","or","dict","or","list","[",":","obj",":","`","ConfigDict","`","or","dict","]",")",":","Initialization","config","dict",".","Defaults","to","None","."]
code: def __init__(
      self,
      num_proposals: int = 100,
      proposal_feature_channel: int = 256,
      init_cfg: OptConfigType = None,
      **kwargs,
  ) -> None:
      # `**kwargs` is necessary to avoid some potential error.
      assert init_cfg is None, (
          "To prevent abnormal initialization "
          "behavior, init_cfg is not allowed to be set"
      )
      super().__init__(init_cfg=init_cfg)
      self.num_proposals = num_proposals
      self.proposal_feature_channel = proposal_feature_channel
      self._init_layers()
  
file_path: mmdetection/mmdet/models/dense_heads/embedding_rpn_head.py
imports: from typing import List
  import torch
  import torch.nn
  from mmengine.model import BaseModule
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.registry import MODELS
  from mmdet.structures.bbox import bbox_cxcywh_to_xyxy
  from mmdet.structures.det_data_sample import SampleList
  from mmdet.utils import InstanceList, OptConfigType
label_desc: Use image node_id 1 to create a new EmbeddingRPNHead object from inherited base classes: BaseModule with example: obj = EmbeddingRPNHead(num_proposals, proposal_feature_channel, init_cfg)