Skip to content

Commit

Permalink
fix pep8 in mnist_tutorial_tf
Browse files Browse the repository at this point in the history
  • Loading branch information
npapernot committed Aug 24, 2017
1 parent 672acbd commit b4d3cf5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions cleverhans_tutorials/mnist_tutorial_tf.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,13 @@ def evaluate():

adv_x = fgsm.generate(x, **fgsm_params)
if not backprop_through_attack:
# For the fgsm attack used in this tutorial, the attack has zero
# gradient so enabling this flag does not change the gradient.
# For some other attacks, enabling this flag increases the cost of
# training, but gives the defender the ability to anticipate how the
# atacker will change their strategy in response to updates to the
# defender's parameters.
adv_x = tf.stop_gradient(adv_x)
# For the fgsm attack used in this tutorial, the attack has zero
# gradient so enabling this flag does not change the gradient.
# For some other attacks, enabling this flag increases the cost of
# training, but gives the defender the ability to anticipate how
# the atacker will change their strategy in response to updates to
# the defender's parameters.
adv_x = tf.stop_gradient(adv_x)
preds_adv = model.get_probs(adv_x)

# Evaluate the accuracy of the MNIST model on adversarial examples
Expand Down

0 comments on commit b4d3cf5

Please sign in to comment.