1c8990edea80ea31b78618fb4e8ab01396edc95b,art/attacks/carlini.py,CarliniL2Method,generate,#CarliniL2Method#Any#,175

Before Change



            x_adv[batch_index_1:batch_index_2] = best_x_adv_batch

        adv_preds = np.argmax(self.classifier.predict(x_adv), axis=1)
        if self.targeted:
            rate = np.sum(adv_preds == np.argmax(y, axis=1)) / x_adv.shape[0]
        else:
            preds = np.argmax(self.classifier.predict(x), axis=1)
            rate = np.sum(adv_preds != preds) / x_adv.shape[0]
        logger.info("Success rate of C&W attack: %.2f%%", 100*rate)

        return x_adv

    def set_params(self, **kwargs):

After Change



            x_adv[batch_index_1:batch_index_2] = best_x_adv_batch

        logger.info("Success rate of C&W L_2 attack: %.2f%%",
                    100 * compute_success(self.classifier, x, y, x_adv, self.targeted))

        return x_adv

    def set_params(self, **kwargs):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 30

Instances


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 1c8990edea80ea31b78618fb4e8ab01396edc95b
Time: 2019-04-25
Author: Maria-Irina.Nicolae@ibm.com
File Name: art/attacks/carlini.py
Class Name: CarliniL2Method
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/carlini.py
Class Name: CarliniL2Method
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/carlini.py
Class Name: CarliniLInfMethod
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/carlini.py
Class Name: CarliniL2Method
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/carlini.py
Class Name: CarliniLInfMethod
Method Name: generate