And into the processing output funcion that runs the ONNX model:
staticvector output2= vector::Zeros(2);
vector output1(1);
// vector to get resultvectorf x_norm(SAMPLE_SIZE); // vector for prices normalize//--- check for normalization possibilityif(ExtMin>=ExtMax)
{
Print("ExtMin>=ExtMax");
ExtPredictedClass=-1;
return;
}
//--- request last barsif(!x_norm.CopyRates(_Symbol,_Period,COPY_RATES_CLOSE,1,SAMPLE_SIZE))
{
Print("CopyRates ",x_norm.Size());
ExtPredictedClass=-1;
return;
}
float last_close=x_norm[SAMPLE_SIZE-1];
//--- normalize prices
x_norm-=ExtMin;
x_norm/=(ExtMax-ExtMin);
//--- run the inferenceif(!OnnxRun(ExtHandle,0,x_norm,output1,output2))//,output2[0],output2[1]))
{
Print("OnnxRun");
ExtPredictedClass=-1;
return;
}
I get error about the shape of tensor. I spent hours trying to debug but no success. I'd like to get the probabilities for the -1 / 1 class or the class itself.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Hello,
I'm in trouble to get the ONNX output of my model.
Here is the structure of the model :

And my code:
In the init section I have:
And into the processing output funcion that runs the ONNX model:
I get error about the shape of tensor. I spent hours trying to debug but no success.
I'd like to get the probabilities for the -1 / 1 class or the class itself.
Thank you for your help!