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

Add 1d and 2d modules for interpolate with scaling (also fix ONNX Resize op) #2081

Merged
merged 11 commits into from
Jul 31, 2024

Conversation

antimora
Copy link
Collaborator

Pull Request Template

Checklist

  • Confirmed that run-checks all script has been executed.
  • Made sure the book is up to date with changes in this PR.

Related Issues/PRs

  1. Fixes an issue in ONNX import issue: index out of bounds #2058
  2. NaN for [N, C, 1, W] interpolate inputs with bilinear and bicubic modes for burn-wgpu and burn-ndarray backends #2080 bug is discovered

Changes

  1. Add 1d and 2d interpolate modules with scaling factor support.
  2. Fix ONNX Resize OP implementation to use interpolate modules (1d and 2d).

Testing

Added new tests and run-checks.sh all

Copy link

codecov bot commented Jul 30, 2024

Codecov Report

Attention: Patch coverage is 77.80580% with 176 lines in your changes missing coverage. Please review.

Project coverage is 86.40%. Comparing base (47d4139) to head (b5309f6).

Files Patch % Lines
crates/onnx-ir/src/ir.rs 12.90% 54 Missing ⚠️
...rn-tensor/src/tests/module/bilinear_interpolate.rs 0.00% 42 Missing ⚠️
...urn-tensor/src/tests/module/bicubic_interpolate.rs 0.00% 35 Missing ⚠️
crates/burn-import/onnx-tests/tests/onnx_tests.rs 84.49% 20 Missing ⚠️
crates/burn-import/src/onnx/op_configuration.rs 81.70% 15 Missing ⚠️
crates/burn-import/src/burn/node/resize.rs 97.05% 4 Missing ⚠️
...ates/burn-core/src/nn/interpolate/interpolate1d.rs 99.09% 1 Missing ⚠️
...ates/burn-core/src/nn/interpolate/interpolate2d.rs 99.09% 1 Missing ⚠️
crates/burn-core/src/nn/interpolate/mod.rs 85.71% 1 Missing ⚠️
crates/burn-tensor/src/tensor/ops/modules/base.rs 0.00% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2081      +/-   ##
==========================================
- Coverage   86.46%   86.40%   -0.06%     
==========================================
  Files         684      687       +3     
  Lines       87320    87931     +611     
==========================================
+ Hits        75498    75974     +476     
- Misses      11822    11957     +135     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@nathanielsimard nathanielsimard left a comment

Choose a reason for hiding this comment

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

LGTM. I think some of the tests of ONNX could actually become burn_tensor tests at some point.

@antimora antimora merged commit 2971731 into tracel-ai:main Jul 31, 2024
14 checks passed
@nathanielsimard nathanielsimard deleted the interpolate-resize-fixes branch July 31, 2024 20:05
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