Harry24k / adversarial-attacks-pytorch

PyTorch implementation of adversarial attacks [torchattacks]
https://adversarial-attacks-pytorch.readthedocs.io/en/latest/index.html
MIT License
1.86k stars 348 forks source link

Top-K Attack? #56

Closed EdwardRaff closed 2 years ago

EdwardRaff commented 2 years ago

Initially searching through the code and documentation, it's not clear to me if a top-k attack (i.e., the true class should not occur within the top-k predictions) is implemented.

Harry24k commented 2 years ago

Currently, set_mode_targeted_least_likely does not consider the true class. Thank you for your suggestion, and I will update the option for that.