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

epsilon in CIFAR10 #31

Open
sungyoon-lee opened this issue Jan 31, 2020 · 2 comments
Open

epsilon in CIFAR10 #31

sungyoon-lee opened this issue Jan 31, 2020 · 2 comments

Comments

@sungyoon-lee
Copy link

sungyoon-lee commented Jan 31, 2020

Hi,
I've run the code like the following for epsilon=8/255=0.03137 on CIFAR-10:
python examples/cifar.py --proj 50 --norm_train l1_median --norm_test l1 --starting_epsilon 0.001 --epsilon 0.03137 --schedule_length 20 --epochs 60 --cuda_ids 1

However, I've noticed that, in the case of CIFAR, you've used the normalization with the standard deviation 0.225 in the loader (link to loader file), but epsilon is just added to the normalized input (link). So do I have to normalize the epsilon? like 0.03137/0.225?

FYI, with eps=0.03137 I can get the errors
Robust error 0.519 Error 0.392
which are much better than those reported in the paper
Robust error 0.792 Error 0.722
and similar to the reported results for eps=2/255 (Note that 2/255~0.03137/0.225)
Robust error 0.528 Error 0.389.

~ Sungyoon

@riceric22
Copy link
Member

Correct, the epsilon needs to be normalized. I was manually doing this in my experiments by passing in the normalized epsilon directly to the script, but I forgot the default parameter is not normalized.

~Eric

@sungyoon-lee
Copy link
Author

Thanks for the quick response.

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