260185d588c91aa37991a9e3c886bf6ae2e57193,examples/cifar_adversarial_training.py,,,#,10

Before Change


adv_crafter = DeepFool(classifier)
print("\nCraft attack on training examples")
x_train_adv = adv_crafter.generate(x_train)
print("\nCraft attack test examples")
x_test_adv = adv_crafter.generate(x_test)

// Evaluate the classifier on the adversarial samples
preds = np.argmax(classifier.predict(x_test_adv), axis=1)

After Change


from art.utils import load_dataset

// Configure a logger to capture ART outputs; these are printed in console and the level of detail is set to INFO
logger = logging.getLogger()
logger.setLevel(logging.INFO)
handler = logging.StreamHandler()
formatter = logging.Formatter("[%(levelname)s] %(message)s")
handler.setFormatter(formatter)
logger.addHandler(handler)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 260185d588c91aa37991a9e3c886bf6ae2e57193
Time: 2019-02-13
Author: Maria-Irina.Nicolae@ibm.com
File Name: examples/cifar_adversarial_training.py
Class Name:
Method Name:


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: a9b528c9bdeeb76d390827d4efdad4945f5c424c
Time: 2019-02-12
Author: Maria-Irina.Nicolae@ibm.com
File Name: examples/cifar_adversarial_training.py
Class Name:
Method Name:


Project Name: bethgelab/foolbox
Commit Name: 427a1037d0822e6d885592a8639475c10b62fea4
Time: 2019-10-25
Author: git@jonasrauber.de
File Name: foolbox/attacks/boundary_attack.py
Class Name: BoundaryAttack
Method Name: as_generator