IntelLabs / MART

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

Add `_call_` special arg to `SequentialDict` #184

Closed dxoigmn closed 1 year ago

dxoigmn commented 1 year ago

What does this PR do?

This PR enables one to call other methods besides __call__ in sequences. For example, in the snippet below one could directly call MyModel.forward in seq010

modules:
  model:
    _target_: MyModel

training_sequence:
  seq010.forward:
    model:
      images: "input"
      targets: "target.list_of_targets"

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 🙃