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)