ONNX invalid parameter size. how to solve this?

 

i'm trying to use an ONNX file in my expert.

my onnx file has 49 inputs at input index 0,

has 3 outputs at output index 0,

and 1 output at output index 1.

when i try to run session

   vector v_input = vector::Ones(49);
   vector v_output(3);
   vector x_output(1);

   if(!OnnxRun(onnx_handle,ONNX_DEBUG_LOGS | ONNX_NO_CONVERSION,v_input,v_output,x_output))
     {
      Print("OnnxRun failed, error ",GetLastError());
      OnnxRelease(onnx_handle);
      return(INIT_FAILED);
     }else
        {
            Print("v_output: ",v_output);
        }

i got error as below:

2023.05.07 04:35:20.074    Core 1    2021.01.27 00:00:00   ONNX: invalid parameter size, expected 196 bytes instead of 392, inspect code 'Experts\ONNX_TEST_01.mq5' (81:65)

i actually only need the output on output index 0. in phyton i could assign unused variable to some random char and just leave it be as phyton will automatically decide the type.

but i don't think that would work on MQL5. as also had tried to assign the output index 1 to some double variable and it just don't work.

could you pointing me out where did i miss?

thanks.

onnx model and mq5 file are attached

Files:
onnx_test.zip  859 kb
 
You model is expecting float input data type and you provided it double type.
 
Alain Verleyen #:
You model is expecting float input data type and you provided it double type.
thanks Alain. its working now.
just need to use "vectorf" instead if "vector"
Reason: