Jeffkang-94 / pytorch-adversarial-attack

Implementation of gradient-based adversarial attack(FGSM,MI-FGSM,PGD)
76 stars 9 forks source link

Acc and training time #4

Open Leo021017 opened 3 months ago

Leo021017 commented 3 months ago

Hello! I ran your code to train a model by PGD on WideResNet, which you provide, but the accuracy is far less than your provided pre-trained model, and the training is too slow and time-consuming, could you please tell me the reason? Thank you a lot!

SueeH commented 1 month ago

Same problem, train wideResNet by FGSM(or PGD) with cifar10, only 10% acc, while train clean data, acc same with pre-trained model. Any solution?

SueeH commented 1 month ago

Same problem, train wideResNet by FGSM(or PGD) with cifar10, only 10% acc, while train clean data, acc same with pre-trained model. Any solution?

put self.optimizer.zero_grad() after x_adv = self.attacker(x,y) acc increased