Hyperparticle / one-pixel-attack-keras

Keras implementation of "One pixel attack for fooling deep neural networks" using differential evolution on Cifar10 and ImageNet
https://arxiv.org/abs/1710.08864
MIT License
1.21k stars 213 forks source link

rerunning attack on the same images #10

Closed p-shah closed 5 years ago

p-shah commented 5 years ago

Hi,

Just a suggestion: numpy.random.choice(img_samples, samples) should be changed to numpy.random.choice(img_samples, samples, replace=False)

so images aren't duplicated during larger iterations.

Hyperparticle commented 5 years ago

Good catch! I fixed it. :cake: