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.22k stars 214 forks source link

The argument targeted #19

Closed TudouJack closed 4 years ago

TudouJack commented 4 years ago

There is a argument,targeted,in the attack.py .

parser.add_argument('--targeted', action='store_false', help='Set this switch to test for targeted attacks.')

Please tell me,if the action = 'store_false',the attack is targeted or not? Thank u for answering my issue.

Hyperparticle commented 4 years ago

By default, the attack will be untargeted. If you add --targeted to the command-line arguments, then it will be targeted.

The parser syntax can be a bit confusing, action='store_false', just means it the variable will be false by default unless it's specified on the command-line.

TudouJack commented 4 years ago

By default, the attack will be untargeted. If you add --targeted to the command-line arguments, then it will be targeted.

The parser syntax can be a bit confusing, action='store_false', just means it the variable will be false by default unless it's specified on the command-line.

Oh,I got it. Thank you very much,your answer is pretty helpful.