44b6e6737a3385e9d5013bd7d90a96ff1648d94d,tests/attacks/evasion/test_fast_gradient.py,,test_l2_norm_images,#Any#Any#,233

Before Change



    for classifier in image_classifier_list:
        // TODO this if statement must be removed once we have a classifier for both image and tabular data
        if classifier is None:
            logging.warning("Couldn"t perform  this test because no classifier is defined")
            return

        attack = FastGradientMethod(classifier, eps=1, norm=2, batch_size=128)
        x_test_adv = attack.generate(x_test_mnist)

        utils_test.assert_almost_equal_mean(x_test_mnist, x_test_adv, 0.007636424, decimal=0.002)

After Change


        return

    for classifier in image_classifier_list:
        if FastGradientMethod.is_valid_classifier_type(classifier) is False:
            continue

        attack = FastGradientMethod(classifier, eps=1, norm=2, batch_size=128)
        x_test_adv = attack.generate(x_test_mnist)

        utils_test.assert_almost_equal_mean(x_test_mnist, x_test_adv, 0.007636424, decimal=0.002)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 9

Instances


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 44b6e6737a3385e9d5013bd7d90a96ff1648d94d
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: 44b6e6737a3385e9d5013bd7d90a96ff1648d94d
Time: 2020-02-06
Author: killian.levacher@gmail.com
File Name: tests/attacks/evasion/test_fast_gradient.py
Class Name:
Method Name: test_random_initialisation_images


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 44b6e6737a3385e9d5013bd7d90a96ff1648d94d
Time: 2020-02-06
Author: killian.levacher@gmail.com
File Name: tests/attacks/evasion/test_fast_gradient.py
Class Name:
Method Name: test_l1_norm_images


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 44b6e6737a3385e9d5013bd7d90a96ff1648d94d
Time: 2020-02-06
Author: killian.levacher@gmail.com
File Name: tests/attacks/evasion/test_fast_gradient.py
Class Name:
Method Name: test_no_norm_images