30 assert(input.size() > 0);
31 llvm::SmallVector<float, 100> model_input(input.begin(), input.end());
32 llvm::SmallVector<float, 100> model_output;
34 this->
model->
run(model_input, model_output);
37 auto max = std::max_element(model_output.begin(),
39 int argmaxVal = std::distance(model_output.begin(), max);
42 std::cout <<
"---------------MODEL OUTPUT VECTOR:----------------\n";
44 : model_output) { std::cout << e <<
" "; } std::cout
45 <<
"\nmax value and index are " << *max <<
" " << argmaxVal <<
"\n";);
void run(llvm::SmallVector< float, 100 > &input, llvm::SmallVector< float, 100 > &output)
Runs the ONNX model on the input and returns the output.