https://casualganpapers.com/contrastive-loss-supervised-classification/SupCon-explained.html
Check out this paper summary