pytorch-metric-learning
pytorch-metric-learning copied to clipboard
Clarify requirements for ref_labels, or change get_all_pairs_indices and get_all_triplets_indices
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