Open XiaodanLi001 opened 5 years ago
Thanks. The difference between UMIFGSM and TMIFGSM is equal to the difference between un-target attack and target. More detail can be found in Equation 6-7 and Equation 11-12 of Yinpeng Dong et al. Boosting Adversarial Attacks with Momentum. In our implementation, there are totally different, and you can find these difference in "the loss calculation" and "update x in each iteration". For the zero_(), it is a dummy operation since the var_samples is built newly in each iteration. Hope answered your questions.
I just find line 67 is the only difference between them. But in each iteration, the grad.data will be updated automatically. Why did you "zeros" grad.data by hand?