24da68114988a5e98a0607b6cfac620e35252bee,foolbox/attacks/saltandpepper.py,SaltAndPepperNoiseAttack,run,#SaltAndPepperNoiseAttack#Any#Any#Any#,44

Before Change


            x = ep.clip(x, min_, max_)

            // check if we found new best adversarials
            norms = flatten(x).square().sum(axis=-1).sqrt()
            closer = norms < best_advs_norms
            is_adv = is_adversarial(x)  // TODO: ignore those that are not closer anyway
            is_best_adv = ep.logical_and(is_adv, closer)

After Change


            x = ep.clip(x, min_, max_)

            // check if we found new best adversarials
            norms = flatten(x).norms.l2(axis=-1)
            closer = norms < best_advs_norms
            is_adv = is_adversarial(x)  // TODO: ignore those that are not closer anyway
            is_best_adv = ep.logical_and(is_adv, closer)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 6

Non-data size: 7

Instances


Project Name: bethgelab/foolbox
Commit Name: 24da68114988a5e98a0607b6cfac620e35252bee
Time: 2020-02-20
Author: git@jonasrauber.de
File Name: foolbox/attacks/saltandpepper.py
Class Name: SaltAndPepperNoiseAttack
Method Name: run


Project Name: bethgelab/foolbox
Commit Name: 07de1b5a56a506a9bca71f8a070d80244465849b
Time: 2020-02-10
Author: git@jonasrauber.de
File Name: foolbox/attacks/deepfool.py
Class Name: L2DeepFoolAttack
Method Name: get_distances


Project Name: bethgelab/foolbox
Commit Name: 24da68114988a5e98a0607b6cfac620e35252bee
Time: 2020-02-20
Author: git@jonasrauber.de
File Name: foolbox/attacks/brendel_bethge.py
Class Name: L2BrendelBethgeAttack
Method Name: norms


Project Name: bethgelab/foolbox
Commit Name: 07de1b5a56a506a9bca71f8a070d80244465849b
Time: 2020-02-10
Author: git@jonasrauber.de
File Name: foolbox/attacks/deepfool.py
Class Name: L2DeepFoolAttack
Method Name: get_perturbations


Project Name: bethgelab/foolbox
Commit Name: 24da68114988a5e98a0607b6cfac620e35252bee
Time: 2020-02-20
Author: git@jonasrauber.de
File Name: foolbox/attacks/additive_noise.py
Class Name: L2Mixin
Method Name: get_norms


Project Name: bethgelab/foolbox
Commit Name: 24da68114988a5e98a0607b6cfac620e35252bee
Time: 2020-02-20
Author: git@jonasrauber.de
File Name: foolbox/attacks/carlini_wagner.py
Class Name: L2CarliniWagnerAttack
Method Name: run