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 reproduce MNIST results using current codes #20

Closed
ain-soph opened this issue Jul 22, 2021 · 2 comments
Closed

Can't reproduce MNIST results using current codes #20

ain-soph opened this issue Jul 22, 2021 · 2 comments

Comments

@ain-soph
Copy link

ain-soph commented Jul 22, 2021

I just cloned this repo and try to run codes with provided instructions. (the code is not modified.)
Environment: cuda 11.3, python 3.9.6, pytorch 1.9.0, torchvision 0.10.0, installed via miniconda.

I run python train_mnist.py --fname ./new_result.pth to get a model,
and then run python evaluate_mnist.py --fname ./new_result.pth to evaluate the robustness.
and run python evaluate_mnist.py --fname ./new_result.pth --attack none to evaluate the clean accuracy.
image
The result shows that robustness=0.00% and accuracy=97.71%, meaning the trained model is not robust at all.

However, using your pretrained model in models/fgsm.pth brings a robust model. (robustness=88.38% and accuracy=98.50%)
image

Could you provide any comment on how to reproduce your pretrained results?

@ain-soph
Copy link
Author

Please ignore the UserWarning, which is caused by pytorch/vision#4184

@latorrefabian
Copy link

latorrefabian commented Aug 13, 2022

I am having the same issue, did you find a solution? @ain-soph

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