code: def gaussian_focal_loss(pred, gaussian_target, alpha=2.0, gamma=4.0):
      """`Focal Loss <https://arxiv.org/abs/1708.02002>`_ for targets in gaussian
      distribution.
  
      Args:
          pred (torch.Tensor): The prediction.
          gaussian_target (torch.Tensor): The learning target of the prediction
              in gaussian distribution.
          alpha (float, optional): A balanced form for Focal Loss.
              Defaults to 2.0.
          gamma (float, optional): The gamma for calculating the modulating
              factor. Defaults to 4.0.
      """
      eps = 1e-12
      pos_weights = gaussian_target.eq(1)
      neg_weights = (1 - gaussian_target).pow(gamma)
      pos_loss = (
          -(pred + eps).log() * (1 - pred).pow(alpha) * pos_weights
      )
      neg_loss = -(1 - pred + eps).log() * pred.pow(alpha) * neg_weights
      return pos_loss + neg_loss
  
file_path: insightface/detection/scrfd/mmdet/models/losses/gaussian_focal_loss.py
imports: import torch.nn
  from ..builder import LOSSES
  from .utils import weighted_loss
label_desc: Use image node_id 1 for calling a global function with example usage: gaussian_focal_loss(pred, gaussian_target, alpha, gamma) and returns: unknown