pytorch-metric-learning icon indicating copy to clipboard operation
pytorch-metric-learning copied to clipboard

Clarify requirements for ref_labels, or change get_all_pairs_indices and get_all_triplets_indices

Open KevinMusgrave opened this issue 2 years ago • 0 comments

It's normal to try:

labels = torch.arange(32)
x = lmu.get_all_pairs_indices(labels, ref_labels=labels)

This will result in 0 positive pairs because of the labels is ref_labels check. This isn't documented anywhere though.

See https://github.com/KevinMusgrave/pytorch-metric-learning/discussions/495

KevinMusgrave avatar Jun 30 '22 17:06 KevinMusgrave