Skip to content

Commit 7cc6fe6

Browse files
author
Beat Buesser
committed
Fix adversarial training example
Signed-off-by: Beat Buesser <[email protected]>
1 parent 3776d66 commit 7cc6fe6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/adversarial_training_data_augmentation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def build_model(input_shape=(32, 32, 3), nb_classes=10):
6464
classifier = KerasClassifier(build_model(), clip_values=(0, 1), use_logits=False)
6565

6666
# Create attack for adversarial trainer; here, we use 2 attacks, both crafting adv examples on the target model
67-
pgd = ProjectedGradientDescent(classifier, eps=8, eps_step=2, max_iter=10, num_random_init=20)
67+
pgd = ProjectedGradientDescent(classifier, eps=8 / 255, eps_step=2 / 255, max_iter=10, num_random_init=1)
6868

6969
# Create some adversarial samples for evaluation
7070
x_test_pgd = pgd.generate(x_test)

0 commit comments

Comments
 (0)