-
Notifications
You must be signed in to change notification settings - Fork 56
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 Op (_upsample_bilinear2d_aa, _upsample_bicubic2d_aa) | feat(torchlib) #1259
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1259 +/- ##
==========================================
+ Coverage 78.68% 78.85% +0.17%
==========================================
Files 119 119
Lines 15762 15700 -62
Branches 2486 2481 -5
==========================================
- Hits 12403 12381 -22
+ Misses 2950 2911 -39
+ Partials 409 408 -1 ☔ View full report in Codecov by Sentry. |
Test Results 24 files ± 0 24 suites ±0 1h 41m 53s ⏱️ + 11m 9s For more details on these failures, see this check. Results for commit cf4f4af. ± Comparison against base commit 457e52e. This pull request removes 29 and adds 35 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
It would be better if we match values because the values should be deterministic. Do we know how PyTorch does it? |
please see the description for this PR. I add comparison between onnx and torch. |
Would it be helpful to consult the PyTorch implementation? I suspect we need additional processing to implement antialiasing. |
From our discussion: understanding the PyTorch implementation proved to be harder than anticipated (https://github.com/pytorch/pytorch/blob/bcf35c6ae62bb6560befa3550e37a8283944e5f4/aten/src/ATen/native/cpu/UpSampleKernel.cpp#L2009). We will seek additional help for this. |
It seems that the antialias method is different between ONNX and PyTorch, so we can just compare the shape, instead of the value.
Below is the difference between ONXN and PyTorch:
ONXN output = [[[[1.390625]]]]
Torch output = tensor([[[[2.2656]]]])
I also tried some other parameters combination but none of them can match with torch.