class_docstr: `Implementation of paper `SIoU Loss: More Powerful Learning
  for Bounding Box Regression <https://arxiv.org/abs/2205.12740>`_.
  
  Code is modified from https://github.com/meituan/YOLOv6.
  
  Args:
      pred (Tensor): Predicted bboxes of format (x1, y1, x2, y2),
          shape (n, 4).
      target (Tensor): Corresponding gt bboxes, shape (n, 4).
      eps (float): Eps to avoid log(0).
      neg_gamma (bool): `True` follows original implementation in paper.
  
  Return:
      Tensor: Loss tensor.
class_docstr_tok: ["`","Implementation","of","paper","`","SIoU","Loss",":","More","Powerful","Learning","for","Bounding","Box","Regression","<","https",":","\/\/arxiv.org\/abs\/2205.12740",">","`","_",".","Code","is","modified","from","https",":","\/\/github.com\/meituan\/YOLOv6",".","Args",":","pred","(","Tensor",")",":","Predicted","bboxes","of","format","(","x1",",","y1",",","x2",",","y2",")",",","shape","(","n",",","4",")",".","target","(","Tensor",")",":","Corresponding","gt","bboxes",",","shape","(","n",",","4",")",".","eps","(","float",")",":","Eps","to","avoid","log","(","0",")",".","neg_gamma","(","bool",")",":","`","True","`","follows","original","implementation","in","paper",".","Return",":","Tensor",":","Loss","tensor","."]
code: def __init__(
      self,
      eps: float = 1e-6,
      reduction: str = "mean",
      loss_weight: float = 1.0,
      neg_gamma: bool = False,
  ) -> None:
      super().__init__()
      self.eps = eps
      self.reduction = reduction
      self.loss_weight = loss_weight
      self.neg_gamma = neg_gamma
  
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 1 to create a new SIoULoss object from inherited base classes: nn with example: obj = SIoULoss(eps, reduction, loss_weight, neg_gamma)