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

The accuracy is different from the paper. #3

Open
laiguoji opened this issue Oct 8, 2019 · 10 comments
Open

The accuracy is different from the paper. #3

laiguoji opened this issue Oct 8, 2019 · 10 comments

Comments

@laiguoji
Copy link

laiguoji commented Oct 8, 2019

hi, i use your original code(it is wrn_28_10_ad=0_aw=0) to train cifar10, and get the best val accuracy is 95.99%, but when i use the attention version(the params are the same as ./log/wrn_28_10_ad=3_aw=4_err=3.45), the best val acc is 95.88%. it is even worse than the original code(without attention), could you explain it?

@prlz77
Copy link
Owner

prlz77 commented Oct 8, 2019

This is weird, I just reproduced them for another issue. Could you share your log and executing command?

@laiguoji
Copy link
Author

laiguoji commented Oct 9, 2019

Yes, could you please tell me your email? i will share my log with you through email.

@prlz77
Copy link
Owner

prlz77 commented Oct 13, 2019

Looking at your log, I would say that one of the main differences is the batch size. Since you multiply it for the number of gpus, you should modify the learning rate accordingly. I would suggest you train without the multiplier: batch size 128, lr 0.1. Since the pytorch versions are different I would suggest you also try the previous version. Basically, try to keep as close as possible to the original setup. Also try with 5 different random seeds, you should get a number closer to the results in the paper in the median.

@laiguoji
Copy link
Author

Thanks,i train your code without the multiplier: batch size 128, lr 0.1. But among the 3 runs, the best val acc is 96.07%. I don't know why it is not as good as the result of the paper.

@prlz77
Copy link
Owner

prlz77 commented Oct 16, 2019

Does it happen with all the other setups?

@laiguoji
Copy link
Author

I also use the setups as your log(./log/wrn_40_10_ad=3_aw=4_err=3.45), the best val acc is only 96.03%.

@prlz77
Copy link
Owner

prlz77 commented Oct 22, 2019

Weird, I'll try to run it again with the new version of pytorch. Meanwhile it would be interesting to see what results you get with the dropout versions. I reproduced these ones recently for another issue and there was no problem, the numbers where as in the paper.

@laiguoji
Copy link
Author

Thank you for your reply, but i have not run the dropout versions yet.

@Fridaycoder
Copy link

Hi, @prlz77 I have the same problem, I can't get the same accuracy as in the paper, what's worse, I run train_cifar10_warn.sh with the default settings, the best accuracy is 95.5%. The biggest difference is that I use PyTorch 1.0.1, is that what really matter?

@prlz77
Copy link
Owner

prlz77 commented Jan 7, 2020

@Fridaycoder it could be. I'll try to run again with pytorch 1.3.1

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

3 participants