IntelLabs / MART

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

Make Projector batch aware #120

Closed dxoigmn closed 1 year ago

dxoigmn commented 1 year ago

What does this PR do?

The current Projector is not batch/tuple aware, which is necessary for attacks on datasets where input images have different shapes (e.g., COCO). This PR makes it so.

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

Do you have a plan for modality-aware?

dxoigmn commented 1 year ago

Nope.

mzweilin commented 1 year ago

I have made a shared modality-batch-aware mechanism in #115 for Initializer, Projector and Composer.

dxoigmn commented 1 year ago

I have made a shared modality-batch-aware mechanism in #115 for Initializer, Projector and Composer.

Okay. Is the idea that this PR should be updated to use that? I also saw there was an opportunity to DRY the logic but wanted to wait until after we get everything merged. I'll try to read through what you wrote though.

dxoigmn commented 1 year ago

@mzweilin: I think it's better to merge this now than wait for the generic dispatch to be done since it updates the tests to conform to the existing interface.