We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8422c49 commit c041874Copy full SHA for c041874
examples/mnist_cnn_fgsm.py
@@ -47,6 +47,6 @@
47
x_test_adv = adv_crafter.generate(x=x_test, eps=epsilon)
48
49
# Evaluate the classifier on the adversarial examples
50
-scores = np.argmax(classifier.predict(x_test_adv), axis=1)
+preds = np.argmax(classifier.predict(x_test_adv), axis=1)
51
acc = np.sum(preds == np.argmax(y_test, axis=1)) / y_test.shape[0]
52
print("\nTest accuracy on adversarial sample: %.2f%%" % (acc * 100))
0 commit comments