Open yoyococo700 opened 1 month ago
the output would tell you if your shape matches the element count that you are initializing (12). Your input values code is not driven by the shape product.
I may have uncorrectly explained the issue, sorry about that. I have only one input node that takes an 1x12 tensor shape. The C++ code is working without error, every assert is passed. The value of the output node is just very wrong (-0.5 instead of -0.019 on a {-1,1} scale ). I have modified the initial question to include the output of the C++ code.
I have checked that the total_number_elements of the input is equal to 12. I didn't understand what do you mean by
the output would tell you if your shape matches the element count that you are initializing (12)
Thank you in advance for your answer
Describe the issue
I have trained a model (1 inputs node (1x12), 3 outputs but i'm only interessed by the first one) and it behave well when I'm using a python inference. When I switched to C++, for the same input I got another output, very far from the expected python output. Do you have any ideas of what can cause such behavior?
To reproduce
Here is the python code used for testing:
Here is the C++ equivalent, it come from the "model-explorer" sample from the sample repository
And the output of the C++ code
Urgency
No response
Platform
Linux
OS Version
24
ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
1.19.2
ONNX Runtime API
Python
Architecture
X86
Execution Provider
Default CPU
Execution Provider Library Version
No response