【问题标题】:build tensorflow lite on other platform (such as Linux)在其他平台(如 Linux)上构建 tensorflow lite
【发布时间】:2018-08-10 08:36:51
【问题描述】:

由于 tensorflow lite 是针对移动设备的,我只是想知道它是否可以构建在 Linux 平台上?怎么样?

【问题讨论】:

    标签: tensorflow tensorflow-lite


    【解决方案1】:

    我不确定您是否需要在 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 你就不用担心了

    【讨论】:

    • 谢谢,我需要使用 lite 模型在 linux 上构建和运行。
    • tensorflow 团队正在将所有内容移出他们的 2.0 发布的主分支上的 contrib,我已对其进行编辑以指向 1.12 版本
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-08-23
    • 2021-07-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多