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

ONNX avgpool1d #1744

Merged
merged 1 commit into from
May 7, 2024
Merged

ONNX avgpool1d #1744

merged 1 commit into from
May 7, 2024

Conversation

Arjun31415
Copy link
Contributor

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

#1714

Changes

Avgpool 1d added to onnx import

Testing

Describe how these changes have been tested.

@Arjun31415
Copy link
Contributor Author

the failing test is because -

  error: approximate value of `f{32, 64}::consts::FRAC_1_PI` found
     --> crates/burn-import/onnx-tests/tests/onnx_tests.rs:520:59
      |
  520 |         let expected1 = Data::from([[[0.552], [-0.909], [-0.318], [-0.298], [-0.288]]]);
      |                                                           ^^^^^

Idk what to do

@antimora
Copy link
Collaborator

antimora commented May 7, 2024

You can find a corresponding clippy warning and ignore it on that line or generate another random number by changing the seed in your python onnx script. This error is from clippy. It thinks you used a fraction of known constant.

Copy link

codecov bot commented May 7, 2024

Codecov Report

Attention: Patch coverage is 98.53659% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 86.61%. Comparing base (bd06b38) to head (b9c086e).
Report is 1 commits behind head on main.

Files Patch % Lines
crates/burn-import/src/onnx/op_configuration.rs 92.59% 2 Missing ⚠️
crates/burn-core/src/nn/pool/avg_pool1d.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1744      +/-   ##
==========================================
+ Coverage   86.54%   86.61%   +0.06%     
==========================================
  Files         699      700       +1     
  Lines       83223    83427     +204     
==========================================
+ Hits        72025    72257     +232     
+ Misses      11198    11170      -28     

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

@Arjun31415
Copy link
Contributor Author

fixed. Pls review @antimora

Copy link
Collaborator

@antimora antimora left a comment

Choose a reason for hiding this comment

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

Looks great.

Super minor fixes needed (removing accidentally checked in files and comment edit) . Please see inlined comments.

Once they're fixed, it's ready to be merged.

Thanks again for your contribution to the Burn project!

crates/burn-import/out/avg_pool1d.graph.txt Outdated Show resolved Hide resolved
crates/burn-import/out/avg_pool1d.json Outdated Show resolved Hide resolved
crates/burn-import/out/avg_pool1d.rs Outdated Show resolved Hide resolved
@Arjun31415
Copy link
Contributor Author

fixed @antimora

Copy link
Collaborator

@antimora antimora left a comment

Choose a reason for hiding this comment

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

LGTM

Thank you for your contribution and improving Burn!

@antimora antimora merged commit 5bbc5ea into tracel-ai:main May 7, 2024
14 checks passed
@Arjun31415 Arjun31415 deleted the onnx-avgpool branch May 8, 2024 02:52
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.

None yet

2 participants