RElbers / info-nce-pytorch

PyTorch implementation of the InfoNCE loss for self-supervised learning.
MIT License
445 stars 37 forks source link

[Issue] InfoCE rather than InfoNCE #16

Closed k920049 closed 8 months ago

k920049 commented 8 months ago

According to the implementation, you used torch.nn.functional.cross_entropy for computation. This ignores off-diagonal components in similarity matrix. I implemented a NCE version of this and want to contribute to this repo.