Closed henrikju closed 2 years ago
Hi,
this should have been fixed with https://github.com/fra31/auto-attack/commit/40dddf05b3bb62dd723eed9bd4cab7395b79de31. Are you maybe using an older version?
Hi,
yes you are right. I was using an older version. The reason was because i was relying on the automated installation of autoattack from robustbench, i think that might still be pointing to an older version of autoattack.
Thanks!
Right, I'll update that too, thanks!
For the latest pytorch 1.10.0, there is an import error when defining an AutoAttack object:
---> 16 from torch.autograd.gradcheck import zero_gradients 17 18 from autoattack.fab_projections import projection_linf, projection_l2,\
ImportError: cannot import name 'zero_gradients' from 'torch.autograd.gradcheck'.
It seems this can be easily fixed, by replacing all instances of "zero_gradients(im)" with "im.zero_grad()" in fab_pt.py.