class_docstr:     apply contrastive loss but mine the negative sample in the batch.
  apply a mask if the distance between negative pair is too close.
  Parameters
  ----------
  pos_thresh:
      positive threshold of the positive distance
  neg_thresh:
      negative threshold of the negative distance
  min_dist:
      minimum distance to be in the negative sample
class_docstr_tok: ["apply","contrastive","loss","but","mine","the","negative","sample","in","the","batch",".","apply","a","mask","if","the","distance","between","negative","pair","is","too","close",".","Parameters","--","--","--","--","--","pos_thresh",":","positive","threshold","of","the","positive","distance","neg_thresh",":","negative","threshold","of","the","negative","distance","min_dist",":","minimum","distance","to","be","in","the","negative","sample"]
code: def __init__(self, pos_thresh, neg_thresh, min_dist=0.15):
      nn.Module.__init__(self)
      self.pos_thresh = pos_thresh
      self.neg_thresh = neg_thresh
      self.min_dist = min_dist
  
file_path: torch-points3d/torch_points3d/core/losses/metric_losses.py
imports: import torch
  import torch.nn
  import torch.nn.functional
  import numpy
label_desc: Use image node_id 1 to create a new BatchHardContrastiveLoss object from inherited base classes: nn with example: obj = BatchHardContrastiveLoss(pos_thresh, neg_thresh, min_dist)