You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue with Rounding Behavior in onnxruntime's Quantizelinear Layer
It appears that when processing an independent Quantizelinear layer in onnxruntime, the rounding behavior is consistently rounding to the lower integer instead of the expected 'rounding to nearest even'. Does anyone have an idea about why this might be happening?
Experiment
I have constructed a single-layer Quantizelinear onnx model with nearly random input data. The results are as follows:
The first row represents the input.
The second row represents the multiplication result of the input and scale.
The third row represents the result rounded to the nearest even of the second row.
The last row represents the related onnxruntime inference result.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Issue with Rounding Behavior in onnxruntime's Quantizelinear Layer
It appears that when processing an independent Quantizelinear layer in onnxruntime, the rounding behavior is consistently rounding to the lower integer instead of the expected 'rounding to nearest even'. Does anyone have an idea about why this might be happening?
Experiment
I have constructed a single-layer Quantizelinear onnx model with nearly random input data. The results are as follows:
Code
onnx model
Download ONNX Model
Beta Was this translation helpful? Give feedback.
All reactions