signatrix / regnet

Pytorch implementation of network design paradigm described in the paper "Designing Network Design Spaces"
MIT License
183 stars 22 forks source link

Why my Acc@5 always shown 100? #3

Closed morris0824 closed 4 years ago

morris0824 commented 4 years ago

I followed the README to create data folder. data ├── train │ ├── n0 │ └── n1 │ └── n2 │ └── n3 │ └── n4 │── val │ ├── n0 │ └── n1 │ └── n2 │ └── n3 │ └── n4

I modified the NUM_CLASSES = 5 at src/config.py. And all config are default (RegnetY 200MF).

uvipen commented 4 years ago

Hi, Acc@5 is the accuracy for the 5 predicted classes with highest probability. When you set NUM_CLASSES to 5, it mean that your dataset only has 5 classes, so these 5 classes will always have highest probability => acc@5 is always 100%. Acc@5 is only meaningful if your dataset has more than 5 classes Here is one explanation for these term if you are still not clear: https://www.quora.com/What-does-the-terms-Top-1-and-Top-5-mean-in-the-context-of-Machine-Learning-research-papers-when-report-empirical-results

morris0824 commented 4 years ago

@uvipen Thanks for your reply quickly. I thought that will follwed the NUM_CLASSES setting. If my prediction classes less than 5, I need to modify LINE 147 & 193 at train.py. Am I correct?

uvipen commented 4 years ago

Yes, exactly