6a00f3e4b8cb38477ab2985c6a5657f1edcff971,tests_tf/test_mnist_tutorial_jsma.py,TestMNISTTutorialJSMA,test_mnist_tutorial_jsma,#TestMNISTTutorialJSMA#,6
Before Change
np.random.seed(42)
import tensorflow as tf
tf.set_random_seed(42)
from cleverhans_tutorials import mnist_tutorial_jsma
// Run the MNIST tutorial on a dataset of reduced size
After Change
"viz_enabled": False,
"source_samples": 1,
"nb_epochs": 2}
g = tf.Graph()
with g.as_default():
np.random.seed(42)
report = mnist_tutorial_jsma.mnist_tutorial_jsma(**jsma_tutorial_args)
// Check accuracy values contained in the AccuracyReport object
// We already have JSMA tests in test_attacks.py, so just sanity
// check the values here.
self.assertTrue(report.clean_train_clean_eval > 0.65)
self.assertTrue(report.clean_train_adv_eval < 0.25)
// There is no adversarial training in the JSMA tutorial
self.assertTrue(report.adv_train_clean_eval == 0.)
self.assertTrue(report.adv_train_adv_eval == 0.)
g = tf.Graph()
with g.as_default():
np.random.seed(42)
report_2 = mnist_tutorial_jsma.mnist_tutorial_jsma(**jsma_tutorial_args)
atol_fac = 1e-6
self.assertClose(report.train_clean_train_clean_eval,
report_2.train_clean_train_clean_eval,
atol=atol_fac * 1)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 12
Instances Project Name: tensorflow/cleverhans
Commit Name: 6a00f3e4b8cb38477ab2985c6a5657f1edcff971
Time: 2017-12-12
Author: dberth@google.com
File Name: tests_tf/test_mnist_tutorial_jsma.py
Class Name: TestMNISTTutorialJSMA
Method Name: test_mnist_tutorial_jsma
Project Name: tensorflow/cleverhans
Commit Name: 6a00f3e4b8cb38477ab2985c6a5657f1edcff971
Time: 2017-12-12
Author: dberth@google.com
File Name: tests_tf/test_mnist_blackbox.py
Class Name: TestMNISTBlackboxF
Method Name: test_mnist_blackbox
Project Name: tensorflow/cleverhans
Commit Name: ae63eb836e423e11b86c7239c22795ca68a3063a
Time: 2017-12-11
Author: dberth@google.com
File Name: tests_tf/test_mnist_tutorial_keras_tf.py
Class Name: TestMNISTTutorialKerasTF
Method Name: test_mnist_tutorial_keras_tf
Project Name: tensorflow/cleverhans
Commit Name: 6a00f3e4b8cb38477ab2985c6a5657f1edcff971
Time: 2017-12-12
Author: dberth@google.com
File Name: tests_tf/test_mnist_tutorial_jsma.py
Class Name: TestMNISTTutorialJSMA
Method Name: test_mnist_tutorial_jsma