1c8990edea80ea31b78618fb4e8ab01396edc95b,art/attacks/iterative_method.py,BasicIterativeMethod,generate,#BasicIterativeMethod#Any#,72
Before Change
noise = projection(adv_x - x, self.eps, self.norm)
adv_x = x + noise
adv_preds = np.argmax(self.classifier.predict(adv_x), axis=1)
if self.targeted:
rate = np.sum(adv_preds == target_labels) / adv_x.shape[0]
else:
rate = np.sum(adv_preds != target_labels) / adv_x.shape[0]
logger.info("Success rate of BIM attack: %.2f%%", rate)
return adv_x
After Change
if self._project:
noise = projection(adv_x - x, self.eps, self.norm)
adv_x = x + noise
logger.info("Success rate of BIM attack: %.2f%%",
100 * compute_success(self.classifier, x, targets, adv_x, self.targeted))
return adv_x
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 22
Instances
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 1c8990edea80ea31b78618fb4e8ab01396edc95b
Time: 2019-04-25
Author: Maria-Irina.Nicolae@ibm.com
File Name: art/attacks/iterative_method.py
Class Name: BasicIterativeMethod
Method Name: generate
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: ae95a28d571e8e3e4cdbd22ca14f0c7b681f75bd
Time: 2019-04-25
Author: Maria-Irina.Nicolae@ibm.com
File Name: art/attacks/iterative_method.py
Class Name: BasicIterativeMethod
Method Name: generate
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 1c8990edea80ea31b78618fb4e8ab01396edc95b
Time: 2019-04-25
Author: Maria-Irina.Nicolae@ibm.com
File Name: art/attacks/iterative_method.py
Class Name: BasicIterativeMethod
Method Name: generate
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 1c8990edea80ea31b78618fb4e8ab01396edc95b
Time: 2019-04-25
Author: Maria-Irina.Nicolae@ibm.com
File Name: art/attacks/fast_gradient.py
Class Name: FastGradientMethod
Method Name: generate