const long output_pro[] = {2}; if(!OnnxSetOutputShape(m_model_handle,1,output_pro)) { Print("OnnxSetOutputShape error ",GetLastError()); return(INIT_FAILED); }
Problem solved!
OnnxSetOutputShape(m_model_handle,1,output_pro)
Always returns False, but works.
MetaEditor Version: 5.00 build 4040 20 Oct 2023

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
This example is provided in build 3980:https://www.mql5.com/en/forum/454439
The iris.onnx model is generated through this python code:
I try to use it in MQL5, but don't know how to set the Shape of the second output.
This setting will report error 5802, ERR_ONNX_NOT_SUPPORTED.
If do not use this function, running directly will report the error: ONNX: parameter is empty.
The following is the complete code:
Attached is the iris.onnx model.
Model input and output.
Please help me, where did I write it wrong?