salesforce / PCL

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

The settings for KNN classifier? #13

Closed Hzzone closed 2 years ago

Hzzone commented 3 years ago

Thanks for your work. I am confused about your settings for KNN classifier. I used the KNN predict function from MoCo, which uses the test set to match the training set with K nearest neighbors and T for temperature. I am curious that, what K and T do you set, and which train or test set do you use as probe set? Looking forward to your reply!

LiJunnan1992 commented 3 years ago

Hi, I used K=20 and T=0.07. I used the test set as query to search for nearest neighbors in the training set.

Hzzone commented 3 years ago

Thanks for your reply.