bf635f90dae66e4ddd3e1f342dca925b3c99faf7,foolbox/attacks/binarization.py,BinarizationRefinementAttack,__call__,#,9
Before Change
is_adv1 = is_adversarial(x)
is_adv2 = is_adversarial(p)
assert (
is_adv1 == is_adv2
).all(), "The specified threshold does not match what is done by the model."
return p.tensor
After Change
is_adv1 = is_adversarial(x)
is_adv2 = is_adversarial(p)
if (is_adv1 != is_adv2).any():
raise ValueError(
"The specified threshold does not match what is done by the model."
)
return restore_type(p)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: bethgelab/foolbox
Commit Name: bf635f90dae66e4ddd3e1f342dca925b3c99faf7
Time: 2020-02-11
Author: git@jonasrauber.de
File Name: foolbox/attacks/binarization.py
Class Name: BinarizationRefinementAttack
Method Name: __call__
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: bethgelab/foolbox
Commit Name: 80cfb0e5f889c65a972ebde6c6dae4278b5e28c1
Time: 2020-02-14
Author: git@jonasrauber.de
File Name: foolbox/attacks/base.py
Class Name: Repeated
Method Name: __call__