CupidJay / MoCov3-pytorch

custom pytorch implementation of MoCo v3
43 stars 6 forks source link

Problems about the “Computes the accuracy ” #1

Closed tangtaogo closed 3 years ago

tangtaogo commented 3 years ago

Thanks your fast implementation of mocov3. But I confused about the "acc1/acc5 are (K+1)-way contrast classifier accuracy" in your code. Can I get correct acc through output, target = model(im_q=images[1], im_k=images[0])? In other words, how can I get the kNN monitor in the paper?

CupidJay commented 3 years ago

Thanks for your interest. The classifier accuracy was the metric used in MoCo and MoCov2, which means the instance discrimination accuracy in the memory bank (please refer to the official paper and code). MoCov3 was trained in a different way and I commented these lines in my code and only recorded the loss during training for MoCov3. For KNN monitor, I have no plan to update and you can implement this function yourself.

tangtaogo commented 3 years ago

Thank you for your kind reply, I will try to implement this function by myself.