class_docstr: DDQ auxiliary branches loss for dense queries.
  
  Args:
      loss_cls (dict):
          Configuration of classification loss function.
      loss_bbox (dict):
          Configuration of bbox regression loss function.
      train_cfg (dict):
          Configuration of gt targets assigner for each predicted bbox.
class_docstr_tok: ["DDQ","auxiliary","branches","loss","for","dense","queries",".","Args",":","loss_cls","(","dict",")",":","Configuration","of","classification","loss","function",".","loss_bbox","(","dict",")",":","Configuration","of","bbox","regression","loss","function",".","train_cfg","(","dict",")",":","Configuration","of","gt","targets","assigner","for","each","predicted","bbox","."]
code: def __init__(
      self,
      loss_cls=dict(
          type="QualityFocalLoss",
          use_sigmoid=True,
          activated=True,  # use probability instead of logit as input
          beta=2.0,
          loss_weight=1.0,
      ),
      loss_bbox=dict(type="GIoULoss", loss_weight=2.0),
      train_cfg=dict(
          assigner=dict(type="TopkHungarianAssigner", topk=8),
          alpha=1,
          beta=6,
      ),
  ):
      super(DDQAuxLoss, self).__init__()
      self.train_cfg = train_cfg
      self.loss_cls = MODELS.build(loss_cls)
      self.loss_bbox = MODELS.build(loss_bbox)
      self.assigner = TASK_UTILS.build(self.train_cfg["assigner"])
  
      sampler_cfg = dict(type="PseudoSampler")
      self.sampler = TASK_UTILS.build(sampler_cfg)
  
file_path: mmdetection/mmdet/models/losses/ddq_detr_aux_loss.py
imports: import torch
  import torch.nn
  from mmengine.structures import BaseDataElement
  from mmdet.models.utils import multi_apply
  from mmdet.registry import MODELS, TASK_UTILS
  from mmdet.utils import reduce_mean
label_desc: Use image node_id 1 to create a new DDQAuxLoss object from inherited base classes: nn with example: obj = DDQAuxLoss(loss_cls, loss_bbox, train_cfg)