class_docstr: IoULoss.
  
  Computing the IoU loss between a set of predicted bboxes and target bboxes.
  
  Args:
      linear (bool): If True, use linear scale of loss else determined
          by mode. Default: False.
      eps (float): Epsilon to avoid log(0).
      reduction (str): Options are "none", "mean" and "sum".
      loss_weight (float): Weight of loss.
      mode (str): Loss scaling mode, including "linear", "square", and "log".
          Default: 'log'
class_docstr_tok: ["IoULoss",".","Computing","the","IoU","loss","between","a","set","of","predicted","bboxes","and","target","bboxes",".","Args",":","linear","(","bool",")",":","If","True",",","use","linear","scale","of","loss","else","determined","by","mode",".","Default",":","False",".","eps","(","float",")",":","Epsilon","to","avoid","log","(","0",")",".","reduction","(","str",")",":","Options","are","``","none","''",",","``","mean","''","and","``","sum","''",".","loss_weight","(","float",")",":","Weight","of","loss",".","mode","(","str",")",":","Loss","scaling","mode",",","including","``","linear","''",",","``","square","''",",","and","``","log","''",".","Default",":","'log","'"]
code: def __init__(
      self,
      linear: bool = False,
      eps: float = 1e-6,
      reduction: str = "mean",
      loss_weight: float = 1.0,
      mode: str = "log",
  ) -> None:
      super().__init__()
      assert mode in ["linear", "square", "log"]
      if linear:
          mode = "linear"
          warnings.warn(
              'DeprecationWarning: Setting "linear=True" in '
              'IOULoss is deprecated, please use "mode=`linear`" '
              "instead."
          )
      self.mode = mode
      self.linear = linear
      self.eps = eps
      self.reduction = reduction
      self.loss_weight = loss_weight
  
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 IoULoss object from inherited base classes: nn with example: obj = IoULoss(linear, eps, reduction, loss_weight, mode)