pytorch-metric-learning
pytorch-metric-learning copied to clipboard
Only use distance.compute_mat if indices_tuple is None or number of pairs/triplets is greater than some threshold
If the number of mined pairs or triplets is small, then it doesn't make sense to compute all pairwise distances in the batch using compute_mat.