IntelLabs / MART

Modular Adversarial Robustness Toolkit
BSD 3-Clause "New" or "Revised" License
16 stars 0 forks source link

Allow `LitModular` to load from checkpoints with states of `Adversary` #160

Closed mzweilin closed 1 year ago

mzweilin commented 1 year ago

What does this PR do?

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.

Before submitting

Did you have fun?

Make sure you had fun coding 🙃

mzweilin commented 1 year ago

Is it not possible to filter in adversary.py or does load_state_dict not recurse? Hardcoding input_adv_ is a bad idea...

Good idea! I can override Adversary._load_from_state_dict().