v1.6.0
Features
DistributedLossWrapper
and DistributedMinerWrapper
now support ref_emb
and ref_labels
:
from pytorch_metric_learning import losses
from pytorch_metric_learning.utils import distributed as pml_dist
loss_func = losses.ContrastiveLoss()
loss_func = pml_dist.DistributedLossWrapper(loss_func)
loss = loss_func(embeddings, labels, ref_emb=ref_emb, ref_labels=ref_labels)