Skip to content

Commit c041874

Browse files
Irina NicolaeIrina Nicolae
authored andcommitted
Correct printed results for mnist example
(cherry picked from commit 2d94ada) (cherry picked from commit 4b3e7b4)
1 parent 8422c49 commit c041874

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/mnist_cnn_fgsm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@
4747
x_test_adv = adv_crafter.generate(x=x_test, eps=epsilon)
4848

4949
# Evaluate the classifier on the adversarial examples
50-
scores = np.argmax(classifier.predict(x_test_adv), axis=1)
50+
preds = np.argmax(classifier.predict(x_test_adv), axis=1)
5151
acc = np.sum(preds == np.argmax(y_test, axis=1)) / y_test.shape[0]
5252
print("\nTest accuracy on adversarial sample: %.2f%%" % (acc * 100))

0 commit comments

Comments
 (0)