Open
Conversation
15 tasks
dxoigmn
commented
Jun 8, 2023
dxoigmn
commented
Jun 8, 2023
mzweilin
reviewed
Jun 8, 2023
Member
Author
|
I should note that I'm not sure this works in multi-gpu mode. |
Member
Author
This does work but one must beware that MART/mart/configs/trainer/ddp.yaml Line 8 in ed89c72 |
16 tasks
dxoigmn
commented
Jun 28, 2023
| @@ -1,2 +1,11 @@ | |||
| attack_in_eval_mode: | |||
| _target_: mart.callbacks.AttackInEvalMode | |||
| module_classes: ??? | |||
Member
Author
There was a problem hiding this comment.
Add support for module_names?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
I think it's worth thinking about whether we should merge this PR. Note that
AttackInEvalModewill be wrong in newer versions of PL since it puts the model intotrainmode afteron_train_startis called: https://lightning.ai/docs/pytorch/stable/common/lightning_module.html#hooks.That said, I do not like using
evalmode since many modules branch onself.training. I think a better option is to replace batch norm layers with frozen batch norm and remove dropout layers since that is the semantics one actually wants.evalmode is just abused to do that.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
pre-commit run -acommand without errorsDid you have fun?
Make sure you had fun coding 🙃