-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Add uint8 bicubic support to ResizeV2 #7668
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/7668
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 8e6351b: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
ArgsKwargs((33, 26), interpolation=v2_transforms.InterpolationMode.BICUBIC, antialias=True), | ||
ArgsKwargs((34, 25), interpolation=PIL.Image.BICUBIC, antialias=True), | ||
], | ||
closeness_kwargs=dict(rtol=0, atol=21), |
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.
Had to pull these tests out so in order not to affect the atol=1
for the other tests.
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.
LGTM, thanks @NicolasHug !
Thanks for the review and for the help with the tests @vfdev-5 . As a quick sanity check I evaluated the perf of some of our models that were trained with bicubic. Evaluation is done on PIL, float tensors and uint8 tensors (this PR). They're all extremely close.
|
Summary: Co-authored-by: vfdev-5 <vfdev.5@gmail.com> Reviewed By: vmoens Differential Revision: D46724117 fbshipit-source-id: e47e4fbb2be67830fe56e22f1a806b8742d7652c
Same as #7557 but for bicubic mode.
See pytorch/pytorch#103252 (comment) for AVX benchmarks. TL;DR: it's ~8X faster for tensors and ~4X for PIL.
Unlike bilinear mode, the bicubic uint8 path seems to be faster than the float path even on non-AVX archs:
cc @vfdev-5