PyTorch Triplet Loss with Multiple Positives and Hard Negatives
Implements PyTorch functions for hard negative mining and triplet loss using cosine similarity logits and binary masks, specifically handling scenarios where anchors have multiple positive matches.
