Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@konstantin-pueckler-qc
Copy link
Contributor

@konstantin-pueckler-qc konstantin-pueckler-qc commented Jul 24, 2025

Description

np.asarray ensures that an array is returned. This is necessary since np.exp returns a scalar when the input has length 1.

Motivation and Context

The problem arouse when testing onnx-reference via the https://github.com/cbourjau/onnx-tests tool.

Signed-off-by: Konstantin Pueckler <[email protected]>
@konstantin-pueckler-qc konstantin-pueckler-qc requested a review from a team as a code owner July 24, 2025 13:32
@github-project-automation github-project-automation bot moved this to In progress in PR Tracker Jul 24, 2025
Copy link
Member

@justinchuby justinchuby left a comment

Choose a reason for hiding this comment

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

Could you add the PR description as a comment inline? Thanks

@github-project-automation github-project-automation bot moved this from In progress to Reviewer approved in PR Tracker Jul 24, 2025
@justinchuby justinchuby enabled auto-merge (squash) July 24, 2025 15:14
@justinchuby justinchuby changed the title fixed Softmax for inputs of length 1 Fix Softmax for inputs of length 1 Jul 24, 2025
@justinchuby justinchuby disabled auto-merge July 24, 2025 15:15
@justinchuby justinchuby enabled auto-merge (squash) July 24, 2025 15:15
@justinchuby justinchuby changed the title Fix Softmax for inputs of length 1 Fix Softmax reference for inputs of length 1 Jul 24, 2025
@justinchuby justinchuby disabled auto-merge July 24, 2025 15:15
@justinchuby justinchuby enabled auto-merge (squash) July 24, 2025 15:15
@codecov
Copy link

codecov bot commented Jul 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 53.64%. Comparing base (019d4d1) to head (01adb2e).
Report is 8 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7169   +/-   ##
=======================================
  Coverage   53.64%   53.64%           
=======================================
  Files         508      508           
  Lines       32177    32178    +1     
  Branches     2971     2971           
=======================================
+ Hits        17260    17261    +1     
  Misses      14120    14120           
  Partials      797      797           

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

@justinchuby justinchuby merged commit 0005457 into onnx:main Jul 24, 2025
61 of 65 checks passed
@github-project-automation github-project-automation bot moved this from Reviewer approved to Done in PR Tracker Jul 24, 2025
alx256 pushed a commit to alx256/onnx that referenced this pull request Aug 1, 2025
### Description
``np.asarray`` ensures that an array is returned. This is necessary
since ``np.exp`` returns a scalar when the input has length 1.

### Motivation and Context
The problem arouse when testing onnx-reference via the
https://github.com/cbourjau/onnx-tests tool.

Signed-off-by: Konstantin Pueckler <[email protected]>
Signed-off-by: Alexander Poulson <[email protected]>
MagellaX pushed a commit to MagellaX/onnx that referenced this pull request Aug 9, 2025
### Description
``np.asarray`` ensures that an array is returned. This is necessary
since ``np.exp`` returns a scalar when the input has length 1.

### Motivation and Context
The problem arouse when testing onnx-reference via the
https://github.com/cbourjau/onnx-tests tool.

Signed-off-by: Konstantin Pueckler <[email protected]>
Signed-off-by: Yash solanki <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants