在其他平台(例如Linux)上构建tensorflow lite
build tensorflow lite on other platform (such as Linux)
由于tensorflow lite是针对移动设备的,我只是想知道它是否可以在Linux平台上构建?怎么样?
我不确定您是否需要在移动设备上构建 Linux 和 运行,这将是默认用例,但我猜您想要构建并且 运行 在 Linux 上。在这种情况下,检查 example code,
并像这样在 linux 机器上构建 运行:
# From the Tensorflow repo root
bazel build '//tensorflow/contrib/lite/examples/label_image'
bazel-bin/tensorflow/contrib/lite/examples/label_image \
-m my_model.tflite
-i my_image.bmp
-m labels.txt
您可以找到标签文件 here:
如果您想构建自己的代码,请查看 BUILD file 并根据您的需要进行编辑。
具体依赖是什么我也不清楚,但是如果你用tensorflow开发docker镜像tensorflow/tensorflow:1.10.0-devel
就不用担心
由于tensorflow lite是针对移动设备的,我只是想知道它是否可以在Linux平台上构建?怎么样?
我不确定您是否需要在移动设备上构建 Linux 和 运行,这将是默认用例,但我猜您想要构建并且 运行 在 Linux 上。在这种情况下,检查 example code, 并像这样在 linux 机器上构建 运行:
# From the Tensorflow repo root
bazel build '//tensorflow/contrib/lite/examples/label_image'
bazel-bin/tensorflow/contrib/lite/examples/label_image \
-m my_model.tflite
-i my_image.bmp
-m labels.txt
您可以找到标签文件 here:
如果您想构建自己的代码,请查看 BUILD file 并根据您的需要进行编辑。
具体依赖是什么我也不清楚,但是如果你用tensorflow开发docker镜像tensorflow/tensorflow:1.10.0-devel
就不用担心