Closed mzweilin closed 1 year ago
Adversary.perturber
pl.Trainer
Adversary._register_load_state_dict_pre_hook()
Please check all relevant options.
Please describe the tests that you ran to verify your changes. Consider listing any relevant details of your test configuration.
pytest
python -m mart experiment=CIFAR10_CNN_Adv trainer=gpu trainer.precision=16
pre-commit run -a
Make sure you had fun coding 🙃
Is it not possible to filter in adversary.py or does load_state_dict not recurse? Hardcoding input_adv_ is a bad idea...
adversary.py
load_state_dict
input_adv_
Good idea! I can override Adversary._load_from_state_dict().
Adversary._load_from_state_dict()
What does this PR do?
Adversary.perturber
to make use of all features ofpl.Trainer
.Adversary._register_load_state_dict_pre_hook()
to avoid resuming from perturbation in a checkpoint.Type of change
Please check all relevant options.
Testing
Please describe the tests that you ran to verify your changes. Consider listing any relevant details of your test configuration.
pytest
python -m mart experiment=CIFAR10_CNN_Adv trainer=gpu trainer.precision=16
reports 70.08%Before submitting
pre-commit run -a
command without errorsDid you have fun?
Make sure you had fun coding 🙃