File "/home/satoharu/AdEx/SDPML/src/attacker/Attacker.py", line 65, in attack
adv_example = self._attack(log=log, *args, **kwargs)
File "/home/satoharu/AdEx/SDPML/src/attacker/AUTOPGD.py", line 96, in _attack
adversary = AutoAttack(
File "/home/satoharu/.pyenv/versions/3.9.4_sdp/lib/python3.9/site-packages/autoattack/autoattack.py", line 31, in __init__
from .fab_pt import FABAttack
File "/home/satoharu/.pyenv/versions/3.9.4_sdp/lib/python3.9/site-packages/autoattack/fab_pt.py", line 16, in <module>
from torch.autograd.gradcheck import zero_gradients
ImportError: cannot import name 'zero_gradients' from 'torch.autograd.gradcheck' (/home/satoharu/.pyenv/versions/3.9.4_sdp/lib/python3.9/site-packages/torch/autograd/gradcheck.py)
I updated my pytorch to
1.9.0
viaAfter that, I got the next error message.
I think the
zero_gradients
method was removed.Reference
https://pytorch.org/get-started/locally/