class_docstr: AutoAssignHead head used in AutoAssign.
  
  More details can be found in the `paper
  <https://arxiv.org/abs/2007.03496>`_ .
  
  Args:
      force_topk (bool): Used in center prior initialization to
          handle extremely small gt. Default is False.
      topk (int): The number of points used to calculate the
          center prior when no point falls in gt_bbox. Only work when
          force_topk if True. Defaults to 9.
      pos_loss_weight (float): The loss weight of positive loss
          and with default value 0.25.
      neg_loss_weight (float): The loss weight of negative loss
          and with default value 0.75.
      center_loss_weight (float): The loss weight of center prior
          loss and with default value 0.75.
class_docstr_tok: ["AutoAssignHead","head","used","in","AutoAssign",".","More","details","can","be","found","in","the","`","paper","<","https",":","\/\/arxiv.org\/abs\/2007.03496",">","`","_",".","Args",":","force_topk","(","bool",")",":","Used","in","center","prior","initialization","to","handle","extremely","small","gt",".","Default","is","False",".","topk","(","int",")",":","The","number","of","points","used","to","calculate","the","center","prior","when","no","point","falls","in","gt_bbox",".","Only","work","when","force_topk","if","True",".","Defaults","to","9.","pos_loss_weight","(","float",")",":","The","loss","weight","of","positive","loss","and","with","default","value","0.25.","neg_loss_weight","(","float",")",":","The","loss","weight","of","negative","loss","and","with","default","value","0.75.","center_loss_weight","(","float",")",":","The","loss","weight","of","center","prior","loss","and","with","default","value","0.75","."]
code: def __init__(
      self,
      *args,
      force_topk: bool = False,
      topk: int = 9,
      pos_loss_weight: float = 0.25,
      neg_loss_weight: float = 0.75,
      center_loss_weight: float = 0.75,
      **kwargs,
  ) -> None:
      super().__init__(*args, conv_bias=True, **kwargs)
      self.center_prior = CenterPrior(
          force_topk=force_topk,
          topk=topk,
          num_classes=self.num_classes,
          strides=self.strides,
      )
      self.pos_loss_weight = pos_loss_weight
      self.neg_loss_weight = neg_loss_weight
      self.center_loss_weight = center_loss_weight
      self.prior_generator = MlvlPointGenerator(self.strides, offset=0)
  
imports: from typing import Dict, List, Sequence, Tuple
  import torch
  import torch.nn
  import torch.nn.functional
  from mmcv.cnn import Scale
  from mmengine.model import bias_init_with_prob, normal_init
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.registry import MODELS
  from mmdet.structures.bbox import bbox_overlaps
  from mmdet.utils import InstanceList, OptInstanceList, reduce_mean
  from ..task_modules.prior_generators import MlvlPointGenerator
  from ..utils import levels_to_images, multi_apply
  from .fcos_head import FCOSHead
label_desc: Use image node_id 1 to create a new AutoAssignHead object from inherited base classes: FCOSHead with example: obj = AutoAssignHead()