qilong-zhang / Pytorch_Universal-adversarial-perturbation

A PyTorch implementation of universal adversarial perturbation (UAP) which is more easy to understand and implement.
54 stars 5 forks source link

Attention before using!!! #2

Closed winterwindwang closed 2 years ago

winterwindwang commented 2 years ago

Firstly, modify the theta to 0.2 in universal_pert.py, otherwise, the algorithm will fall into an endless loop (the default setting set the target fooling to 98%). Secondly, assign the parameters "epsilon" the 47-th line in search.py to xi, like v = universal_perturbation(X, val_loader, net, xi=epsilon)

qilong-zhang commented 2 years ago

Hi @winterwindwang, thank you very much for pointing out these bugs, which may have been caused by an oversight in my previous upload. I have fixed them, thanks again!