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

added interpolation for vitmae model in pytorch as well as tf. #30732

Merged

Conversation

bhuvanmdev
Copy link
Contributor

What does this PR do?

Adds interpolation capabilities for the tf and pytorch versions of vit_mae along with the test cases.

Addresses #30579 (vit_mae)
as discussed in #30657

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested.

@amyeroberts

@bhuvanmdev
Copy link
Contributor Author

Apologies, My previous PR got polluted with commits due to my negligence and lack of knowledge :( . I will make sure that is not repeated ever again.

@amyeroberts
Copy link
Collaborator

Apologies, My previous PR got polluted with commits due to my negligence and lack of knowledge :( . I will make sure that is not repeated ever again.

@bhuvanmdev It's OK, we're all learning :) If you hit tricky issues with the PR or git, feel free to ping on the PR and we can try to help (can't guarantee we'll know the answer though!)

Copy link
Collaborator

@amyeroberts amyeroberts left a comment

Choose a reason for hiding this comment

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

Looks great - thanks for working on this!

Just a few small comments

src/transformers/models/vit_mae/modeling_tf_vit_mae.py Outdated Show resolved Hide resolved
src/transformers/models/vit_mae/modeling_tf_vit_mae.py Outdated Show resolved Hide resolved
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
@bhuvanmdev
Copy link
Contributor Author

bhuvanmdev commented May 16, 2024

Done @amyeroberts

Copy link
Collaborator

@amyeroberts amyeroberts left a comment

Choose a reason for hiding this comment

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

Thanks for adding!

Just some nits on typing and docstrings

src/transformers/models/vit_mae/modeling_vit_mae.py Outdated Show resolved Hide resolved
src/transformers/models/vit_mae/modeling_vit_mae.py Outdated Show resolved Hide resolved
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
src/transformers/models/vit_mae/modeling_vit_mae.py Outdated Show resolved Hide resolved
src/transformers/models/vit_mae/modeling_vit_mae.py Outdated Show resolved Hide resolved
src/transformers/models/vit_mae/modeling_vit_mae.py Outdated Show resolved Hide resolved
src/transformers/models/vit_mae/modeling_vit_mae.py Outdated Show resolved Hide resolved
src/transformers/models/vit_mae/modeling_tf_vit_mae.py Outdated Show resolved Hide resolved
src/transformers/models/vit_mae/modeling_tf_vit_mae.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@amyeroberts amyeroberts left a comment

Choose a reason for hiding this comment

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

Thanks for adding this really useful feature to our vision models!

Just some small nits on the docstrings

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
src/transformers/models/vit_mae/modeling_vit_mae.py Outdated Show resolved Hide resolved
src/transformers/models/vit_mae/modeling_vit_mae.py Outdated Show resolved Hide resolved
src/transformers/models/vit_mae/modeling_vit_mae.py Outdated Show resolved Hide resolved
src/transformers/models/vit_mae/modeling_tf_vit_mae.py Outdated Show resolved Hide resolved
doc fixes

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
Copy link
Collaborator

@amyeroberts amyeroberts left a comment

Choose a reason for hiding this comment

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

Thanks for adding and iterating on this!

For the quality checks - these are unrelated to this PR. We're currently battling to fix them. Once that's done I'll message here, we can rebase and this should be good to merge!

@amyeroberts
Copy link
Collaborator

@bhuvanmdev Should be good to rebase!

@bhuvanmdev
Copy link
Contributor Author

@amyeroberts should I sync this branch wrt to upstream main branch?

@amyeroberts
Copy link
Collaborator

@bhuvanmdev Yes please

@amyeroberts amyeroberts merged commit e5103a7 into huggingface:main May 24, 2024
19 checks passed
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.

2 participants