80cfb0e5f889c65a972ebde6c6dae4278b5e28c1,foolbox/attacks/base.py,MinimizationAttack,__call__,#MinimizationAttack#Any#Any#Any#,340

Before Change


        is_adv = is_adversarial(xp)
        assert is_adv.shape == (N,)

        distances = self.distance(x, xp)
        assert distances.shape == (N,)

        in_limits = ep.stack(
            [distances <= epsilon for epsilon in limit_epsilons], axis=0

After Change



        xpcs = []
        success = []
        for epsilon in epsilons:
            if epsilon is None:
                xpc = xp
            else:
                xpc = self.distance.clip_perturbation(x, xp, epsilon)
            is_adv = is_adversarial(xpc)

            xpcs.append(xpc)
            success.append(is_adv)

        success_ = ep.stack(success)
        assert success_.shape == (K, N)

        xp_ = restore_type(xp)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: bethgelab/foolbox
Commit Name: 80cfb0e5f889c65a972ebde6c6dae4278b5e28c1
Time: 2020-02-14
Author: git@jonasrauber.de
File Name: foolbox/attacks/base.py
Class Name: MinimizationAttack
Method Name: __call__


Project Name: biotite-dev/biotite
Commit Name: 9c1f289b1dce08abf5577319046f00de640393aa
Time: 2019-02-12
Author: bauer@cbs.tu-darmstadt.de
File Name: src/biotite/structure/rdf.py
Class Name:
Method Name: rdf


Project Name: ricsinaruto/Seq2seqChatbots
Commit Name: bb7a59f5fc19bc6a967a9a9cfc40e8bd08086aaf
Time: 2018-04-26
Author: ricsinaruto@hotmail.com
File Name: t2t_csaky/data_filtering/filter_problem.py
Class Name: FilterProblem
Method Name: find_medoid