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

Fix transpose onnx op (permute) #1657

Merged
merged 3 commits into from
Apr 19, 2024
Merged

Fix transpose onnx op (permute) #1657

merged 3 commits into from
Apr 19, 2024

Conversation

laggui
Copy link
Member

@laggui laggui commented Apr 18, 2024

Related Issues/PRs

Fixes #1642

Changes

Previous implementation incorrectly used tensor.transpose(), while the ONNX standard actually defines transpose akin to permute

Testing

Updated the test to transpose/permute multiple dimensions

Copy link

codecov bot commented Apr 18, 2024

Codecov Report

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

Project coverage is 86.38%. Comparing base (7705fd9) to head (795e638).

Files Patch % Lines
crates/burn-import/src/onnx/op_configuration.rs 68.75% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1657      +/-   ##
==========================================
- Coverage   86.38%   86.38%   -0.01%     
==========================================
  Files         693      693              
  Lines       80473    80497      +24     
==========================================
+ Hits        69519    69538      +19     
- Misses      10954    10959       +5     

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

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. Thanks for this fixing it.

@nathanielsimard nathanielsimard merged commit b65a487 into main Apr 19, 2024
15 checks passed
@nathanielsimard nathanielsimard deleted the fix/onnx/transpose branch April 19, 2024 13:34
syl20bnr pushed a commit that referenced this pull request Apr 26, 2024
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.

Incorrect implementation of Transpose ONNX operation
3 participants