class_docstr: ATSS head with visual-language fusion module.
  
  Args:
      early_fuse (bool): Whether to fuse visual and language features
          Defaults to False.
      use_checkpoint (bool): Whether to use checkpoint. Defaults to False.
      num_dyhead_blocks (int): Number of dynamic head blocks. Defaults to 6.
      lang_model_name (str): Name of the language model.
          Defaults to 'bert-base-uncased'.
class_docstr_tok: ["ATSS","head","with","visual-language","fusion","module",".","Args",":","early_fuse","(","bool",")",":","Whether","to","fuse","visual","and","language","features","Defaults","to","False",".","use_checkpoint","(","bool",")",":","Whether","to","use","checkpoint",".","Defaults","to","False",".","num_dyhead_blocks","(","int",")",":","Number","of","dynamic","head","blocks",".","Defaults","to","6.","lang_model_name","(","str",")",":","Name","of","the","language","model",".","Defaults","to","'bert-base-uncased","'","."]
docstr: Calculate the centerness between anchors and gts.
  
  Only calculate pos centerness targets, otherwise there may be nan.
  
  Args:
      anchors (Tensor): Anchors with shape (N, 4), "xyxy" format.
      gts (Tensor): Ground truth bboxes with shape (N, 4), "xyxy" format.
  
  Returns:
      Tensor: Centerness between anchors and gts.
docstr_tok: ["Calculate","the","centerness","between","anchors","and","gts",".","Only","calculate","pos","centerness","targets",",","otherwise","there","may","be","nan",".","Args",":","anchors","(","Tensor",")",":","Anchors","with","shape","(","N",",","4",")",",","``","xyxy","''","format",".","gts","(","Tensor",")",":","Ground","truth","bboxes","with","shape","(","N",",","4",")",",","``","xyxy","''","format",".","Returns",":","Tensor",":","Centerness","between","anchors","and","gts","."]
code: def centerness_target(self, anchors: Tensor, gts: Tensor) -> Tensor:
      """Calculate the centerness between anchors and gts.
  
      Only calculate pos centerness targets, otherwise there may be nan.
  
      Args:
          anchors (Tensor): Anchors with shape (N, 4), "xyxy" format.
          gts (Tensor): Ground truth bboxes with shape (N, 4), "xyxy" format.
  
      Returns:
          Tensor: Centerness between anchors and gts.
      """
      anchors_cx = (anchors[:, 2] + anchors[:, 0]) / 2
      anchors_cy = (anchors[:, 3] + anchors[:, 1]) / 2
      l_ = anchors_cx - gts[:, 0]
      t_ = anchors_cy - gts[:, 1]
      r_ = gts[:, 2] - anchors_cx
      b_ = gts[:, 3] - anchors_cy
  
      left_right = torch.stack([l_, r_], dim=1)
      top_bottom = torch.stack([t_, b_], dim=1)
      centerness = torch.sqrt(
          (left_right.min(dim=-1)[0] / left_right.max(dim=-1)[0])
          * (top_bottom.min(dim=-1)[0] / top_bottom.max(dim=-1)[0])
      )
      # assert not torch.isnan(centerness).any()
      return centerness
  
imports: import copy
  import math
  from typing import Callable, List, Optional, Sequence, Tuple, Union
  import torch
  import torch.nn
  import torch.nn.functional
  from mmcv.cnn import Scale
  from mmcv.ops.modulated_deform_conv import ModulatedDeformConv2d
  from mmengine.config import ConfigDict
  from mmengine.model import BaseModel
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.registry import MODELS
  from mmdet.structures.bbox import cat_boxes
  from mmdet.utils import InstanceList, OptInstanceList, reduce_mean
  from ..utils import BertEncoderLayer, VLFuse, filter_scores_and_topk, permute_and_flatten, select_single_mlvl, unpack_gt_instances
  from ..utils.vlfuse_helper import MAX_CLAMP_VALUE
  from .atss_head import ATSSHead
label_desc: Use image node_id 8 for calling the ATSSVLFusionHead obj's underlying member method code with example usage: obj.centerness_target(anchors, gts) and returns: centerness