Skip to content
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

[Swin, Swinv2] Fix attn_mask dtype #18803

Merged
merged 2 commits into from
Aug 30, 2022
Merged

Conversation

NielsRogge
Copy link
Contributor

What does this PR do?

This PR fixes the dtype of the attn_mask, making mixed precision training possible.

Fixes #17481

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Aug 29, 2022

The documentation is not available anymore as the PR was closed or merged.

Copy link
Contributor

@alaradirik alaradirik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! The PR fixes the attn_mask dtype issue

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @NielsRogge!

@LysandreJik LysandreJik merged commit 7320d95 into huggingface:main Aug 30, 2022
oneraghavan pushed a commit to oneraghavan/transformers that referenced this pull request Sep 26, 2022
* Add dtype

* Fix Swinv2 as well

Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

modeling_swin.py img_mask doesn't have expected torch dtype
4 participants