Vanint / SADE-AgnosticLT

This repository is the official Pytorch implementation of Self-Supervised Aggregation of Diverse Experts for Test-Agnostic Long-Tailed Recognition (NeurIPS 2022).
MIT License
146 stars 20 forks source link

About a question of test_training_cifar.py #13

Closed lastonephy closed 2 years ago

lastonephy commented 2 years ago

In line 200 and 201 of test_training_cifar.py: dataset = IMBALANCECIFAR100(data_dir, train=True, download=True, transform=train_trsfm, imb_type=imb_type, imb_factor=test_imb_factor, reverse=reverse) train_dataset = IMBALANCECIFAR100(data_dir, train=True, download=True, transform= TwoCropsTransform(train_trsfm), imb_type=imb_type, imb_factor=test_imb_factor, reverse=reverse) why you set the train is True? I think it should be False to obtain the weighting parameters of test set. Can you explain it? Thanks!

Vanint commented 2 years ago

Hi. thanks for mentioning this. We double-check the test_training_cifar.py and find that this file is the wrong version when we clear up the open-source file. In fact, you will obtain the results reported in our paper or on GitHub by changing Line 201 to

train_dataset = IMBALANCECIFAR100(data_dir, train=False, download=True, transform= TwoCropsTransform(train_trsfm), imb_type=imb_type, imb_factor=test_imb_factor, reverse=reverse)

We have modified the corresponding code file on Github. Thanks again.

Vanint commented 2 years ago

If you have any further questions, please let me know~