sthalles / SimCLR

PyTorch implementation of SimCLR: A Simple Framework for Contrastive Learning of Visual Representations
https://sthalles.github.io/simple-self-supervised-learning/
MIT License
2.19k stars 458 forks source link

Calculating acc in training #27

Open timothyvanco opened 3 years ago

timothyvanco commented 3 years ago

Hi, I have a question about calculating an Accuracy in training mode of SimCLR model. How is it working, or how is it possible, that you can compute accuracy when you are training on data without labels? Thanks a lot!

stojk commented 3 years ago

I think it's the accuracy of correctly matching the augmented pairs of the same input sample, as contrastive loss is crossentropy.

feiwu77777 commented 1 year ago

Hello, does someone has a reference to where this accuracy metric comes from? I have read the simCLR paper and haven't found it. Is it something the author of this repository came up with?