-
Notifications
You must be signed in to change notification settings - Fork 19.5k
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 torch backend resize with pad_to_aspectio_ratio
is set to True
#20797
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #20797 +/- ##
========================================
Coverage 82.01% 82.01%
========================================
Files 557 558 +1
Lines 52014 52150 +136
Branches 8037 8062 +25
========================================
+ Hits 42657 42771 +114
- Misses 7403 7416 +13
- Partials 1954 1963 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Thanks for the PR -- can you add a simple unit test for this change? |
Added a tests under |
Thanks a lot! Can you take a look at the resulting test failure with the numpy backend? Looks like a numerical mismatch, perhaps numpy had the same issue. https://github.com/keras-team/keras/actions/runs/12956346950/job/36142411678?pr=20797 |
Yup it seems like that, logic of numpy backend is also off just corrected it. |
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.
Nice, thank you for the fix!
The resize doesn't work as expected while setting flag
pad_to_aspectio_ratio=True
.