You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

18 lines
538 B

#include <iostream>
#include <onnxruntime/onnxruntime.h>
#include <onnxruntime/core/session/onnxruntime_session.h>
#include <onnxruntime/core/provider/cpu/cpu_provider_factory.h>
using namespace std;
using namespace onnxruntime;
int main() {
// 初始化ONNX Runtime
OrtSessionOptions session_options;
session_options.SetGraphOptimizationLevel(GraphOptimizationLevel::ORT_ENABLE_ALL);
session_options.SetExecutionProvider_CPU(true);
OrtSession session(session_options);
printf("Run ONNX Done..")
return 0;
}