Setting Up and Using ONNX Runtime for C++ in Linux

TL;DR AI
2 min readKey summary
ONNX Runtime lets you run .onnx models in native C++ programs on Linux without a Python environment.
Install GCC and CMake, then download the Linux C++ ONNX Runtime package and extract it into your project.
Copy the runtime include and lib folders into external/onnxruntime, add the ONNX Runtime shared target in CMake, and set BUILD_RPATH.
The example uses squeezenet1_1 and a simple C++ program that runs inference with a dummy tensor and prints the result.
