ShadeAlsha / LTR-weight-balancing

CVPR 2022 - official implementation for "Long-Tailed Recognition via Weight Balancing" https://arxiv.org/abs/2203.14197
MIT License
118 stars 10 forks source link

Reproducibility.. Shocking.. #15

Closed piltgha closed 1 year ago

piltgha commented 1 year ago

Also, I find that I can never achieve 46% in 200 epoch,... with tuned WD with cross entropy..

you trained it for 320 epoch.

ShadeAlsha commented 1 year ago

I believe that there's a confusion here. In the demo notebook the model was trained for 320 epochs, and it achieved average class accuracy of 47%. The reported accuracy of 46.08% in the paper was achieved after training the model for 200 epochs.

If you wish to train the model for 200 epochs, don't forget to modify the total_epoch_num parameter in the cosine annealing learning rate scheduler accordingly scheduler = lr_scheduler.CosineAnnealingLR(optimizer, total_epoch_num, eta_min=0). With 200 epochs, you should be able to achieve an average class accuracy near to 46%, which matches the reported result in the paper.

I have just tested the code on Google Colab and it is giving consistent results (a screenshot is attached below). Other users have also reported success in running the code. Therefore, it is possible that the issue you are facing is related to your local environment.

Screen Shot 2023-04-03 at 12 25 32 PM