0

I'm playing with the mnist_tutorial_pytorch.py, and I set the eps = 0 in the fgsm_params dictionary.

Based on my understanding this means that fgsm attack should do nothing and the target model's accuracy will not decrease.

But I got a pytorch model which test accuracy is 99.05% and the adv accuracy is 97.94%. I noticed that this pytorch model is converted to a tensorflow model by the convert_pytorch_model_to_tf() function. So, is the decrease caused by the conversion or something else?

Parameters I have used for replication:

fgsm_params = {"eps": 0.3, "clip_min": 0.0, "clip_max": 1.0}  # I replaced 0.3 to 0.
Szymon Maszke
  • 22,747
  • 4
  • 43
  • 83
axewang
  • 1
  • 1

1 Answers1

0

We now added support for PyTorch to CleverHans so you don't have to convert your model first. The FGSM attack can be found here: https://github.com/tensorflow/cleverhans/blob/master/cleverhans/future/torch/attacks/fast_gradient_method.py