Misspelled Method in art.defences.trainer.certified_adversarial_trainer_pytorch.py #2032
Replies: 1 comment
-
Hi @GreedyGroot thank you for your interest in ART! It sound like you may be passing a pytorch model (or maybe an incorrect ART estimator) to make the trainer. Essentially, AdversarialTrainerCertifiedPytorch requires a PytorchDeepZ estimator. So your python script should do something like 1) create a pytorch model, 2) pass the model to PytorchDeepZ to get a estimator with certification functionality, and 3) finally pass this estimator to AdversarialTrainerCertifiedPytorch. Have you been able to run the notebook here: https://github.com/Trusted-AI/adversarial-robustness-toolbox/blob/main/notebooks/certified_adversarial_training.ipynb ? Specifically in relation to the two items you raised:
You could have a look at the PytorchDeepZ file itself to see what is going on behind the scenes: Let me know if the above resolves your errors! If this was the problem we could incorporate a check into AdversarialTrainerCertifiedPytorch to assert that the estimator being passed in is of the correct type, and if not raising a more informative error. Giulio |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In art.defences.trainer.certified_adversarial_trainer_pytorch.py in line 213 the method that should be called is named _apply_preprocessing not apply_preprocessing resulting in an error.
Edit: Also the method set_foward_mode results in an error if I run it on PyTorch since a PyTorch model has no method set_foward_mode
Beta Was this translation helpful? Give feedback.
All reactions