Neargye/hello_tf_c_api
Neural Network TensorFlow C API
What it solves
It provides a practical, cross-platform set of examples for developers who want to use the TensorFlow C API to run machine learning models in C++ applications without relying on the full Python environment.
How it works
The project uses CMake to automate the process of downloading the TensorFlow Python wheel and linking its native C API headers and libraries. It includes a variety of source files that demonstrate specific tasks, such as loading graphs, creating tensors, and performing repeated inference, which can then be compiled for Windows, Linux, or macOS.
Who it’s for
C++ developers who need to integrate TensorFlow inference into their software and require concrete examples of how to handle tensors, sessions, and graph loading using the C API.
Highlights
- Cross-platform support for Windows, Linux, and macOS.
- Comprehensive examples covering tensor creation, image processing, and batch interfaces.
- Automated dependency management via CMake to fetch the TensorFlow runtime.
- Includes a sample GraphDef model for immediate testing.