-
This repository provides:
- cmake project to generate TensorFlow Lite for Microcontrollers ( TFLM ) as a library
- You can easily use TFLM in your project by adding this repository as git-submodule
- sample project (hello world project) to use the TFLM library
- cmake project to generate TensorFlow Lite for Microcontrollers ( TFLM ) as a library
-
The TFLM library in this repo doesn't have platform-specific hardware optimizations. So the library should run on any platform
- I made this repository mainly for development on PC (Windows and Linux on x64)
- When you use a specific hardware like Arduino, it' better to create a new library for the device to get better performance
mkdir -p build && cd build/
cmake ..
make -j4
./examples/hello_world/hello_world
- Use cmake-gui
Refer to examples/hello_world/CMakeLists.txt
- Clone code and generate all projects
- It's actually no need to generate all projects, but just generating hello_world project didn't work to me
git clone https://github.com/tensorflow/tensorflow.git
cd tensorflow
# git checkout 1e8f4666f2fbc1bdd4ce2797b218de0453cffc63
make -f tensorflow/lite/micro/tools/make/Makefile generate_projects
# make -f tensorflow/lite/micro/tools/make/Makefile generate_hello_world_make_project
ls tensorflow/lite/micro/tools/make/gen/linux_x86_64_default/prj/hello_world/tensorflow_lite.zip
- Add CMakeLists.txt files
- Do some modifications (see commit log to find diff)