TangentAttack
TangentAttack copied to clipboard
ImportError: cannot import name 'zero_gradients'
On running command like:
!python tangent_attack_hemisphere/attack.py --gpu 0 --norm l2 --dataset CIFAR-10 --arch resnet-50
I get:
Traceback (most recent call last):
File "tangent_attack_hemisphere/attack.py", line 19, in <module>
from models.defensive_model import DefensiveModel
File "/content/models/defensive_model.py", line 14, in <module>
from adversarial_defense.feature_scatter.attack_methods import Attack_FeaScatter
File "/content/adversarial_defense/feature_scatter/attack_methods.py", line 6, in <module>
from torch.autograd.gradcheck import zero_gradients
ImportError: cannot import name 'zero_gradients' from 'torch.autograd.gradcheck' (/usr/local/lib/python3.7/dist-packages/torch/autograd/gradcheck.py)
On colab I am not able to successfully install requirements.txt, but was hoping it would work.