class_docstr: Implementation of paper `Extended-IoU Loss: A Systematic
  IoU-Related Method: Beyond Simplified Regression for Better
  Localization <https://ieeexplore.ieee.org/abstract/document/9429909>`_
  
  Code is modified from https://github.com//ShiqiYu/libfacedetection.train.
  
  Args:
      eps (float): Epsilon to avoid log(0).
      reduction (str): Options are "none", "mean" and "sum".
      loss_weight (float): Weight of loss.
      smooth_point (float): hyperparameter, default is 0.1.
class_docstr_tok: ["Implementation","of","paper","`","Extended-IoU","Loss",":","A","Systematic","IoU-Related","Method",":","Beyond","Simplified","Regression","for","Better","Localization","<","https",":","\/\/ieeexplore.ieee.org\/abstract\/document\/9429909",">","`","_","Code","is","modified","from","https",":","\/\/github.com\/\/ShiqiYu\/libfacedetection.train",".","Args",":","eps","(","float",")",":","Epsilon","to","avoid","log","(","0",")",".","reduction","(","str",")",":","Options","are","``","none","''",",","``","mean","''","and","``","sum","''",".","loss_weight","(","float",")",":","Weight","of","loss",".","smooth_point","(","float",")",":","hyperparameter",",","default","is","0.1","."]
docstr: Forward function.
  
  Args:
      pred (Tensor): Predicted bboxes of format (x1, y1, x2, y2),
          shape (n, 4).
      target (Tensor): The learning target of the prediction,
          shape (n, 4).
      weight (Optional[Tensor], optional): The weight of loss for each
          prediction. Defaults to None.
      avg_factor (Optional[int], optional): Average factor that is used
          to average the loss. Defaults to None.
      reduction_override (Optional[str], optional): The reduction method
          used to override the original reduction method of the loss.
          Defaults to None. Options are "none", "mean" and "sum".
  
  Returns:
      Tensor: Loss tensor.
code: def forward(
      self,
      pred: Tensor,
      target: Tensor,
      weight: Optional[Tensor] = None,
      avg_factor: Optional[int] = None,
      reduction_override: Optional[str] = None,
      **kwargs,
  ) -> Tensor:
      """Forward function.
  
      Args:
          pred (Tensor): Predicted bboxes of format (x1, y1, x2, y2),
              shape (n, 4).
          target (Tensor): The learning target of the prediction,
              shape (n, 4).
          weight (Optional[Tensor], optional): The weight of loss for each
              prediction. Defaults to None.
          avg_factor (Optional[int], optional): Average factor that is used
              to average the loss. Defaults to None.
          reduction_override (Optional[str], optional): The reduction method
              used to override the original reduction method of the loss.
              Defaults to None. Options are "none", "mean" and "sum".
  
      Returns:
          Tensor: Loss tensor.
      """
      if weight is not None and not torch.any(weight > 0):
          if pred.dim() == weight.dim() + 1:
              weight = weight.unsqueeze(1)
          return (pred * weight).sum()  # 0
      assert reduction_override in (None, "none", "mean", "sum")
      reduction = (
          reduction_override if reduction_override else self.reduction
      )
      if weight is not None and weight.dim() > 1:
          assert weight.shape == pred.shape
          weight = weight.mean(-1)
      loss = self.loss_weight * eiou_loss(
          pred,
          target,
          weight,
          smooth_point=self.smooth_point,
          eps=self.eps,
          reduction=reduction,
          avg_factor=avg_factor,
          **kwargs,
      )
      return loss
  
imports: import math
  import warnings
  from typing import Optional
  import torch
  import torch.nn
  from torch import Tensor
  from mmdet.registry import MODELS
  from mmdet.structures.bbox import bbox_overlaps
  from .utils import weighted_loss
label_desc: Use image node_id 2 for calling the EIoULoss obj's underlying member method code with example usage: obj.forward(pred, target, weight, avg_factor, reduction_override) and returns: loss, unknown