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

[ViTMAE] Fix docstrings and variable names #17710

Merged
merged 4 commits into from
Jun 21, 2022

Conversation

NielsRogge
Copy link
Contributor

@NielsRogge NielsRogge commented Jun 15, 2022

What does this PR do?

Fixes #17473
Fixes #17665

This PR improves the docstrings and variable names of the patchify, unpatchify and forward_loss methods of ViTMAE. This way, also the number of channels isn't hardcoded anymore.

cc @sayakpaul

@NielsRogge NielsRogge requested a review from sgugger June 15, 2022 10:27
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jun 15, 2022

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

Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

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

Good for me with one more rename. Thanks a lot for working on this!

src/transformers/models/vit_mae/modeling_tf_vit_mae.py Outdated Show resolved Hide resolved
src/transformers/models/vit_mae/modeling_vit_mae.py Outdated Show resolved Hide resolved
@NielsRogge NielsRogge merged commit b681e12 into huggingface:main Jun 21, 2022
younesbelkada pushed a commit to younesbelkada/transformers that referenced this pull request Jun 25, 2022
* Fix docstrings and variable names

* Rename x to something better

* Improve messages

* Fix docstrings and add test for greyscale images

Co-authored-by: Niels Rogge <[email protected]>
younesbelkada pushed a commit to younesbelkada/transformers that referenced this pull request Jun 29, 2022
* Fix docstrings and variable names

* Rename x to something better

* Improve messages

* Fix docstrings and add test for greyscale images

Co-authored-by: Niels Rogge <[email protected]>
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.

Transformer Vit-MAE hard coded image channels Number of channels in the ViTMAE model
4 participants