IntelLabs / MART

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

Add `_train_mode_` and `_inference_mode_` special args to `SequentialDict` #176

Closed dxoigmn closed 1 year ago

dxoigmn commented 1 year ago

What does this PR do?

This PR adds _train_mode_ and _inference_mode_ as special args to SequentialDict. These special args enable one to control, at instantiation time or run time, whether the underlying model should be run in train mode (or not) and whether it should be run in inference mode (or not).

This is a more direct version of #141.

Depends upon the following:

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 🙃