markdown 如何为linux编译tflite

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 如何为linux编译tflite相关的知识,希望对你有一定的参考价值。

# TFLITE for linux
source: https://stackoverflow.com/questions/55125977/how-to-build-tensorflow-lite-as-a-static-library-and-link-to-it-from-a-separate

First compile the static library:
```
$ ./tensorflow/lite/tools/make/download_dependencies.sh
$ make -f tensorflow/lite/tools/make/Makefile
```
**If the 'download_dependencies.sh' script fails in the tensorflow version you are using, try to download the last version of this file from the [tensorflow repository](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/tools/make).

By default make would just do native build.
The output library will be stored as 

```
<tensorflow-root>/tensorflow/lite/tools/make/gen/<platform>/lib/libtensorflow-lite.a
```
And the external dependencies with their headers would go into 

```
<tensorflow-root>/tensorflow/tensorflow/lite/tools/make/downloads 
```

(for example flatbuffers headers are in <tensorflow-root>/tensorflow/tensorflow/lite/tools/make/downloads/flatbuffers/include).

以上是关于markdown 如何为linux编译tflite的主要内容,如果未能解决你的问题,请参考以下文章

如何在图像分类上快速运行 tflite 模型

如何为linux和udev的arm视频交叉编译

markdown 从TF模型到TFLITE

如何为Android平台编译 opencv3 和 opencv_contrib (Linux)

markdown 如何为浏览器启用源映射。

如何为多个 Python 版本和平台构建编译模块