Skip to content

[vision_transformer] Make the assert message more verbose #6583

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

Merged
merged 1 commit into from
Sep 14, 2022

Conversation

YosuaMichael
Copy link
Contributor

@YosuaMichael YosuaMichael commented Sep 14, 2022

A small patch addressing problem mentioned in #6428

Currently we give error message like:

Wrong image height!

This is not clear to users on what the expected height should be. In this PR we make this more verbose and add the input height and expected height. Now it become:

Wrong image height, expected 224 but got 518!

Copy link
Contributor

@datumbox datumbox 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 @YosuaMichael.

@YosuaMichael
Copy link
Contributor Author

This already pass linux unittest which I think is enough, the other error on the test is not related to the PR.

@YosuaMichael YosuaMichael merged commit 321f655 into pytorch:main Sep 14, 2022
facebook-github-bot pushed a commit that referenced this pull request Sep 15, 2022
Reviewed By: jdsgomes

Differential Revision: D39543281

fbshipit-source-id: 1d17cf15f5c830be10befaf13158803dd105c5c3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants