64171b3cdf5f0fca6bb11e48831946db63263684,tests/attacks/evasion/test_fast_gradient.py,,test_minimal_perturbations_images,#Any#Any#,99
Before Change
def test_minimal_perturbations_images(fix_get_mnist_subset, image_classifier_list):
(x_train_mnist, y_train_mnist, x_test_mnist, y_test_mnist) = fix_get_mnist_subset
classifier_list = image_classifier_list(FastGradientMethod)
// TODO this if statement must be removed once we have a classifier for both image and tabular data
if classifier_list is None:
After Change
attack_params = {"minimal": True, "eps_step": 0.1, "eps": 5.0}
attack.set_params(**attack_params)
expected_values = {"x_test_mean": ExpectedValue(0.03896513, 0.01),
"x_test_min": ExpectedValue(-0.30000000, 0.00001),
"x_test_max": ExpectedValue(0.30000000, 0.00001),
"y_test_pred_adv_expected": ExpectedValue(np.asarray([4, 2, 4, 7, 0, 4, 7, 2, 0, 7, 0]), 2)}
utils_attack._backend_norm_images(attack, classifier, fix_get_mnist_subset, expected_values)
@pytest.mark.parametrize("norm", [np.inf, 1, 2])
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 64171b3cdf5f0fca6bb11e48831946db63263684
Time: 2020-02-06
Author: killian.levacher@gmail.com
File Name: tests/attacks/evasion/test_fast_gradient.py
Class Name:
Method Name: test_minimal_perturbations_images
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 69cdc613de1b60860f9e1017fe5e960427fe53a1
Time: 2020-02-06
Author: killian.levacher@gmail.com
File Name: tests/attacks/evasion/test_fast_gradient.py
Class Name:
Method Name: test_l2_norm_images
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 4a7b5983d440e4c840f49f45c8bab91fc0e2966f
Time: 2020-02-19
Author: killian.levacher@gmail.com
File Name: tests/classifiersT/test_tensorflow.py
Class Name:
Method Name: test_loss_gradient