lightly
lightly copied to clipboard
Supervised Contrastive Loss
If you would like to take it on @KylevdLangemheen you need to comment, so I can assign it to you!
I looked at this PyTorch implementation – which seems to be even the official one – and the paper. I don't think there's a benefit (or a nice way) to build the loss on top of the existing NTXentLoss, so I would probably implement it from scratch. The loss in the mentioned repository does not seem to support multi-GPU settings (or at least it does not seem to calculate contrast across devices), so that could be a really nice addition from our side. Check the NTXentLoss implementation on how we did this!
Ah yes, I would be interested in taking this one please!