Harry24k/adversarial-attacks-pytorch

[BUG]if use pip install torchattacks, the DeepFool is wrong

kld20092009 opened this issue · 3 comments

✨ Short description of the bug [tl;dr]

I think it is a problem with the version of attacks installed by pip.

💬 Detailed code and results

The code in DeepFool is incorrect. When the label is the maximum value, there will be an array overflow phenomenon.f_k = fs[wrong_classes] will make the array length -1, and it is wrong to overwrite value[lable] at this time. I see this has been fixed in the source code, but in pip is still wrong

Hi, what is the version of torchattacks you are using now?

Hi, what is the version of torchattacks you are using now?

I use 3.4.1 now, and the version in PIP seems to be 3.4.0

I use 3.4.1 now, and the version in PIP seems to be 3.4.0

The version installed via pip is outdated, I suggest users install torchattacks from source. ☺️