Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't achieve the given performance: ResNet-50 + SSP+CE(Uniform) for imageNet-LT #17

Closed
ChCh1999 opened this issue May 21, 2021 · 3 comments

Comments

@ChCh1999
Copy link

I download the pre-trained model from the given path Resnet-50-rot. And train the model with the given config imagenet_inat/config/ImageNet_LT/feat_uniform.yaml
The training cmd is:
python imb_cls/imagenet_inat/main.py --cfg 'imb_cls/imagenet_inat/config/ImageNet_LT/feat_uniform.yaml' --model_dir workdir/pretrain/moco_ckpt_0200.pth.tar.
I only get 41.1 top-1 accuracy but the given model achieved 45.6 [CE(Uniform) + SSP].

Can you help me check where is the problem?
image
image

@YyzHarry
Copy link
Owner

Hi, I double checked the config, which seems fine to me. So currently I'm not sure what exactly causes the difference.

I would suggest that you could first run the baseline model (without SSP), and compare the model performance w/ & w/o SSP. If that gives you reasonable gains, then you might want to check whether the baseline model matches the number reported in our paper. If the performance of the baseline model is also lower than the number reported, then it might be due to the hyperparameters and the training settings.

Otherwise, you may want to check whether the pre-trained weights are loaded correctly, or the exact training setting such as PyTorch version (1.4 for this repo), etc.

@ChCh1999
Copy link
Author

The baseline result is
image
my running environment is
image
And I think the model is loaded correctly because I've tested the given model provided by you and got the correct result.
Does the following output mean the weight for resnet50 loaded?
image
Thanks for your answer.

@YyzHarry
Copy link
Owner

Yes, I think that indicates your loading process is correct. Seems there's a reasonable gap though, but I'm not sure what causes the difference. I would suggest that you could tune the hyper-parameters a bit; I took a quick pass on the original OLTR config, and seems they use 0.1 as initial LR. Also, it is observed that training for longer epochs could lead to better results, so you might want to increase the epoch numbers to see what you can get. Hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants