How to set up onnx when there are 2 outputs?
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
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?