class_docstr: GaussianFocalLoss is a variant of focal loss.
  
  More details can be found in the `paper
  <https://arxiv.org/abs/1808.01244>`_
  Code is modified from `kp_utils.py
  <https://github.com/princeton-vl/CornerNet/blob/master/models/py_utils/kp_utils.py#L152>`_  # noqa: E501
  Please notice that the target in GaussianFocalLoss is a gaussian heatmap,
  not 0/1 binary target.
  
  Args:
      alpha (float): Power of prediction.
      gamma (float): Power of target for negative samples.
      reduction (str): Options are "none", "mean" and "sum".
      loss_weight (float): Loss weight of current loss.
      pos_weight(float): Positive sample loss weight. Defaults to 1.0.
      neg_weight(float): Negative sample loss weight. Defaults to 1.0.
code: def __init__(
      self,
      alpha: float = 2.0,
      beta: float = 4.0,
      gamma: float = 4.0,
      sigmoid_clamp: float = 1e-4,
      ignore_high_fp: float = -1.0,
      loss_weight: float = 1.0,
      pos_weight: float = 1.0,
      neg_weight: float = 1.0,
  ) -> None:
      super().__init__()
      self.alpha = alpha
      self.beta = beta
      self.gamma = gamma
      self.sigmoid_clamp = sigmoid_clamp
      self.ignore_high_fp = ignore_high_fp
      self.loss_weight = loss_weight
      self.pos_weight = pos_weight
      self.neg_weight = neg_weight
  
file_path: mmdetection/projects/Detic_new/detic/heatmap_focal_loss.py
imports: from typing import Optional, Union
  import torch
  import torch.nn
  from torch import Tensor
  from mmdet.registry import MODELS
label_desc: Use image node_id 1 to create a new HeatmapFocalLoss object from inherited base classes: nn with example: obj = HeatmapFocalLoss(alpha, beta, gamma, sigmoid_clamp, ignore_high_fp, loss_weight, pos_weight, neg_weight)