7baa06c0a69e4e5d62483dd46690ac911b54c475,art/attacks/iterative_method_unittest.py,TestIterativeAttack,_test_mnist_targeted,#TestIterativeAttack#Any#,128
Before Change
// Test FGSM with np.inf norm
attack = BasicIterativeMethod(classifier, eps=1.0, eps_step=0.1, targeted=True)
y_test_adv = to_categorical((np.argmax(y_test, axis=1) + 1) % 10, 10)
x_test_adv = attack.generate(x_test, minimal=True, eps_step=0.01, eps=1.0, y=y_test_adv)
self.assertFalse((x_test == x_test_adv).all())
After Change
attack = BasicIterativeMethod(classifier, eps=1.0, eps_step=0.1, targeted=True)
//y_test_adv = to_categorical((np.argmax(y_test, axis=1) + 1) % 10, 10)
pred_sort = classifier.predict(x_test).argsort(axis=1)
y_test_adv = np.zeros((x_test.shape[0],10))
for i in range(x_test.shape[0]):
y_test_adv[i,pred_sort[i,-2]] = 1.0
x_test_adv = attack.generate(x_test, eps_step=0.01, eps=1.0, y=y_test_adv)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 7baa06c0a69e4e5d62483dd46690ac911b54c475
Time: 2018-08-24
Author: BJEdwards@gmail.com
File Name: art/attacks/iterative_method_unittest.py
Class Name: TestIterativeAttack
Method Name: _test_mnist_targeted
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 7baa06c0a69e4e5d62483dd46690ac911b54c475
Time: 2018-08-24
Author: BJEdwards@gmail.com
File Name: art/attacks/fast_gradient_unittest.py
Class Name: TestFastGradientMethod
Method Name: _test_mnist_targeted
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 7baa06c0a69e4e5d62483dd46690ac911b54c475
Time: 2018-08-24
Author: BJEdwards@gmail.com
File Name: art/attacks/iterative_method_unittest.py
Class Name: TestIterativeAttack
Method Name: _test_mnist_targeted
Project Name: titu1994/DenseNet
Commit Name: 3a3dc678e50e60f9cf05e95e992ab873046c1b8f
Time: 2016-12-05
Author: titu1994@gmail.com
File Name: cifar10.py
Class Name:
Method Name: