Error while running example script
wh33li3 opened this issue · 1 comments
Having issues while testing the example script (side note the slack link is expired)
Versions:
Python 3.8.10
PyTorch 1.8.1+cu102
NumPy 1.21.4
python3 attack_cifar10_gradinversion.py --batch_size 16 --tv 0.05 --bn_reg 0.001 --reconstruct_labels
{'reconstruct_labels': True, 'signed_image': False, 'mini': False, 'large': False, 'BN_exact': False, 'attacker_eval_mode': False, 'defender_eval_mode': False, 'total_variation': 0.05, 'epoch': 0, 'bn_reg': 0.001, 'attack_lr': 0.1}
Global seed set to 1234
[ToTensor(), Normalize(mean=(0.4914, 0.4822, 0.4465), std=(0.2023, 0.1994, 0.201))]
Files already downloaded and verified
Files already downloaded and verified
Loaded data!
Traceback (most recent call last):
File "attack_cifar10_gradinversion.py", line 199, in
pipeline, attack_hparams = setup_attack()
File "attack_cifar10_gradinversion.py", line 77, in setup_attack
model = create_lightning_module(
File "/home/ubuntu/.local/lib/python3.8/site-packages/gradattack/models/init.py", line 493, in create_lightning_module
assert os.path.exists(ckpt), f"Failed to load checkpoint {ckpt}"
AssertionError: Failed to load checkpoint checkpoint/vanilla_epoch=1-step=1531.ckpt
Hi,
Please replace the path of the checkpoint (checkpoint/vanilla_epoch=1-step=1531.ckpt
) with the checkpoint of your own model :)
Please let me know if you have further questions. Thanks!