class_docstr: SSDLoss
  
  Args:
      overlap_threshold (float32, optional): IoU threshold for negative bboxes
          and positive bboxes, 0.5 by default.
      neg_pos_ratio (float): The ratio of negative samples / positive samples.
      loc_loss_weight (float): The weight of loc_loss.
      conf_loss_weight (float): The weight of conf_loss.
      prior_box_var (list): Variances corresponding to prior box coord, [0.1,
          0.1, 0.2, 0.2] by default.
class_docstr_tok: ["SSDLoss","Args",":","overlap_threshold","(","float32",",","optional",")",":","IoU","threshold","for","negative","bboxes","and","positive","bboxes",",","0.5","by","default",".","neg_pos_ratio","(","float",")",":","The","ratio","of","negative","samples","\/","positive","samples",".","loc_loss_weight","(","float",")",":","The","weight","of","loc_loss",".","conf_loss_weight","(","float",")",":","The","weight","of","conf_loss",".","prior_box_var","(","list",")",":","Variances","corresponding","to","prior","box","coord",",","[","0.1",",","0.1",",","0.2",",","0.2","]","by","default","."]
code: def _mine_hard_example(
      self, conf_loss, targets_label, bg_index, mine_neg_ratio=0.01
  ):
      pos = (targets_label != bg_index).astype(conf_loss.dtype)
      num_pos = pos.sum(axis=1, keepdim=True)
      neg = (targets_label == bg_index).astype(conf_loss.dtype)
  
      conf_loss = conf_loss.detach() * neg
      loss_idx = conf_loss.argsort(axis=1, descending=True)
      idx_rank = loss_idx.argsort(axis=1)
      num_negs = []
      for i in range(conf_loss.shape[0]):
          cur_num_pos = num_pos[i]
          num_neg = paddle.clip(
              cur_num_pos * self.neg_pos_ratio, max=pos.shape[1]
          )
          num_neg = (
              num_neg
              if num_neg > 0
              else paddle.to_tensor([pos.shape[1] * mine_neg_ratio])
          )
          num_negs.append(num_neg)
      num_negs = paddle.stack(num_negs).expand_as(idx_rank)
      neg_mask = (idx_rank < num_negs).astype(conf_loss.dtype)
  
      return (neg_mask + pos).astype("bool")
  
file_path: PaddleDetection/ppdet/modeling/losses/ssd_loss.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from ppdet.core.workspace import register
  from ..bbox_utils import iou_similarity, bbox2delta
label_desc: Use image node_id 3 for calling the SSDLoss obj's underlying member method code with example usage: obj._mine_hard_example(conf_loss, targets_label, bg_index, mine_neg_ratio) and returns: unknown