cleverhans-lab / cleverhans

An adversarial example library for constructing attacks, building defenses, and benchmarking both
MIT License
6.15k stars 1.39k forks source link

add torch mnist tutorial with black-formatted file #1202

Closed tejuafonja closed 3 years ago

tejuafonja commented 3 years ago

I added the torch MNIST tutorial to test our new testing set-up 🚀 . I ran the adversarial attack on two different CNN models, named "CNN" and "PyNet".

Summary of the attack success below:

===CNN=== test acc on clean examples (%): 99.180 test acc on FGM adversarial examples (%): 27.030 test acc on PGD adversarial examples (%): 7.560

===PyNet=== test acc on clean examples (%): 99.020 test acc on FGM adversarial examples (%): 9.620
test acc on PGD adversarial examples (%): 0.640

steverab commented 3 years ago

@teja5832 I'm addressing the style change of that other tutorial in another PR. Can you add

requests>=2.25.0

to requirements.txt and push that change?

tejuafonja commented 3 years ago

@steverab did this. The test also failed on mnist download. This is related to #1201 but from the torchvision.dataset class, to work around this problem, I created a dataset.py where I defined the function to download the dataset, similar to what we have in /tutorial/jax/dataset

@teja5832 I'm addressing the style change of that other tutorial in another PR. Can you add

requests>=2.25.0

to requirements.txt and push that change?