72e8efe6c1acc40f0b4a672a4330813e1a4066e5,art/attacks/evasion/auto_attack.py,AutoAttack,_run_attack,#AutoAttack#Any#Any#Any#Any#,189
Before Change
// Check and update successful examples
norm_is_smaller_eps = (
np.linalg.norm((x_robust_adv - x_robust).reshape((x_robust_adv.shape[0], -1)), axis=1, ord=self.norm)
<= self.eps
)
After Change
) <= self.eps
if attack.targeted:
samples_misclassified = np.argmax(y_pred_robust_adv, axis=1) == np.argmax(y_robust, axis=1)
elif not attack.targeted:
samples_misclassified = np.argmax(y_pred_robust_adv, axis=1) != np.argmax(y_robust, axis=1)
else:
raise ValueError
sample_is_not_robust = np.logical_and(samples_misclassified, norm_is_smaller_eps)
x_robust[sample_is_not_robust] = x_robust_adv[sample_is_not_robust]
x[sample_is_robust] = x_robust
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 72e8efe6c1acc40f0b4a672a4330813e1a4066e5
Time: 2020-07-24
Author: beat.buesser@ie.ibm.com
File Name: art/attacks/evasion/auto_attack.py
Class Name: AutoAttack
Method Name: _run_attack
Project Name: titu1994/DenseNet
Commit Name: 516c2a4c7e8f92e1ea299e966215c2ffe4c5b980
Time: 2016-12-07
Author: titu1994@gmail.com
File Name: cifar10.py
Class Name:
Method Name:
Project Name: rusty1s/pytorch_geometric
Commit Name: db28ee240981457335c6fd9c38e542066df214cb
Time: 2020-02-19
Author: matthias.fey@tu-dortmund.de
File Name: examples/cluster_gcn.py
Class Name:
Method Name: test