attend-and-rectify icon indicating copy to clipboard operation
attend-and-rectify copied to clipboard

The accuracy is different from the paper.

Open laiguoji opened this issue 5 years ago • 10 comments

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?

laiguoji avatar Oct 08 '19 13:10 laiguoji

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

prlz77 avatar Oct 08 '19 13:10 prlz77

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

laiguoji avatar Oct 09 '19 01:10 laiguoji

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.

prlz77 avatar Oct 13 '19 00:10 prlz77

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.

laiguoji avatar Oct 15 '19 12:10 laiguoji

Does it happen with all the other setups?

prlz77 avatar Oct 16 '19 15:10 prlz77

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%.

laiguoji avatar Oct 17 '19 04:10 laiguoji

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.

prlz77 avatar Oct 22 '19 12:10 prlz77

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

laiguoji avatar Oct 22 '19 13:10 laiguoji

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?

Fridaycoder avatar Dec 25 '19 06:12 Fridaycoder

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

prlz77 avatar Jan 07 '20 23:01 prlz77