5e1845ab9b7e0fa54affcaf6d1183dcdc1bc3d58,tutorials/mnist_blackbox.py,,main,#Any#,188
Before Change
// Craft adversarial examples using the substitute
adv_x = fgsm(x, substitute_preds, eps=0.3)
eval_params = {"batch_size": FLAGS.batch_size}
X_test_adv, = batch_eval(sess, [x], [adv_x], [X_test], args=eval_params)
// Evaluate the accuracy of the "black-box" model on adversarial examples
accuracy = model_eval(sess, x, y, bbox_preds, X_test_adv, Y_test,
After Change
substitute_preds = train_substitute(sess, x, y, bbox_preds, X_sub, Y_sub)
// Initialize the Fast Gradient Sign Method (FGSM) attack object.
FGSM = FastGradientMethod(x, substitute_preds, sess=sess, clip_min=0.,
clip_max=1., params={"eps": 0.3, "ord": np.inf})
// Craft adversarial examples using the substitute
eval_params = {"batch_size": FLAGS.batch_size}
X_test_adv = FGSM.craft(X_test)
// Evaluate the accuracy of the "black-box" model on adversarial examples
accuracy = model_eval(sess, x, y, bbox_preds, X_test_adv, Y_test,
args=eval_params)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: tensorflow/cleverhans
Commit Name: 5e1845ab9b7e0fa54affcaf6d1183dcdc1bc3d58
Time: 2017-03-26
Author: ngp5056@cse.psu.edu
File Name: tutorials/mnist_blackbox.py
Class Name:
Method Name: main
Project Name: tensorflow/cleverhans
Commit Name: 28af50891d3540e635c5e11fb2308bebc9580d79
Time: 2017-03-28
Author: ngp5056@cse.psu.edu
File Name: tutorials/mnist_tutorial_th.py
Class Name:
Method Name: main
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: e7feb5694cb9954ec8a09877c27f7ca8c289aabb
Time: 2017-05-17
Author: valentina.zantedeschi@ibm.com
File Name: attack_on_mnist.py
Class Name:
Method Name: