class_docstr: Guided-Anchor-based RPN head.
class_docstr_tok: ["Guided-Anchor-based","RPN","head","."]
code: def loss(
      self,
      cls_scores,
      bbox_preds,
      shape_preds,
      loc_preds,
      gt_bboxes,
      img_metas,
      gt_bboxes_ignore=None,
  ):
      losses = super(GARPNHead, self).loss(
          cls_scores,
          bbox_preds,
          shape_preds,
          loc_preds,
          gt_bboxes,
          None,
          img_metas,
          gt_bboxes_ignore=gt_bboxes_ignore,
      )
      return dict(
          loss_rpn_cls=losses["loss_cls"],
          loss_rpn_bbox=losses["loss_bbox"],
          loss_anchor_shape=losses["loss_shape"],
          loss_anchor_loc=losses["loss_loc"],
      )
  
file_path: insightface/detection/scrfd/mmdet/models/dense_heads/ga_rpn_head.py
imports: import torch
  import torch.nn
  import torch.nn.functional
  from mmcv.cnn import normal_init
  from mmcv.ops import nms
  from ..builder import HEADS
  from .guided_anchor_head import GuidedAnchorHead
  from .rpn_test_mixin import RPNTestMixin
label_desc: Use image node_id 5 for calling the GARPNHead obj's underlying member method code with example usage: obj.loss(cls_scores, bbox_preds, shape_preds, loc_preds, gt_bboxes, img_metas, gt_bboxes_ignore) and returns: dict