-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix dropout issue in swin transformers #7224
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the PR @oke-aditya !
Some minor suggestions below, LMK what you think.
@@ -124,6 +124,7 @@ def shifted_window_attention_3d( | |||
dropout: float = 0.0, | |||
qkv_bias: Optional[Tensor] = None, | |||
proj_bias: Optional[Tensor] = None, | |||
training: bool = False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we set the default to True since it's the default of torch.nn.functional.dropout
, and also the default of shifted_window_attention
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well caught this was mistake it should have been True
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @oke-aditya , LGTM!
Summary: Co-authored-by: Nicolas Hug <[email protected]> Reviewed By: vmoens Differential Revision: D44416635 fbshipit-source-id: 8f90f59beb98e36ae98a33a8e1b2abd2d07a430b
Closes #7103