-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Add version converter softmax 13 -> 12 #6608
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 version converter softmax 13 -> 12 #6608
Conversation
e5f11ad
to
da5bab3
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6608 +/- ##
==========================================
+ Coverage 57.50% 57.51% +0.01%
==========================================
Files 507 507
Lines 31636 31645 +9
Branches 3048 3048
==========================================
+ Hits 18191 18200 +9
Misses 12618 12618
Partials 827 827 ☔ View full report in Codecov by Sentry. |
@andife @justinchuby |
Could you add a test here https://github.com/onnx/onnx/blob/main/onnx/test/version_converter_test.py |
671997c
to
06d245a
Compare
Signed-off-by: seungwoo-ji-03 <seungwoo.ji@nuvilab.com> Signed-off-by: seungwoo-ji <seungwoo.ji@nuvilab.com>
Signed-off-by: seungwoo-ji-03 <seungwoo.ji@nuvilab.com> Signed-off-by: seungwoo-ji <seungwoo.ji@nuvilab.com>
06d245a
to
d79ad56
Compare
Signed-off-by: seungwoo-ji <seungwoo.ji@nuvilab.com>
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.
Thanks!
Description
This PR introduces a new version adapter Softmax_13_12 to handle the conversion of the Softmax operator from opset 13 to opset 12 in the ONNX model conversion framework.
Key changes include:
This adapter ensures accurate conversion between opset versions while maintaining expected Softmax behavior.
Motivation and Context
Motivation and Context
This change is required to improve the ONNX version converter’s support for models with Softmax operators. It addresses the discrepancy in axis handling and tensor coercion behavior between opset 13 and opset 12.
The PR resolves Issue #6340, which requested support for converting Softmax from opset 13 to 12.
By adding this adapter, users can now convert models containing Softmax operators from opset 13 to 12 without manual adjustments, enabling smoother workflows and improved backward compatibility.
Testing
The implementation was thoroughly tested using Python and ONNX Runtime. The following test script was used to validate the adapter’s correctness:
The script verifies: