salesforce / PCL

PyTorch code for "Prototypical Contrastive Learning of Unsupervised Representations"
MIT License
570 stars 83 forks source link

About NCE #3

Closed MajorDavidZhang closed 3 years ago

MajorDavidZhang commented 4 years ago

Hi, your work is really excellent! However, I have a question when going through the code. Why the InfoNCE and ProtoNCE are replaced by the cross entropy, instead of the way shown in the paper?

LiJunnan1992 commented 4 years ago

Hi, the InfoNCE and ProtoNCE loss have the same mathematical form as cross-entropy.