|
#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;
|
|
}
|