未找到命令 'toco'

No command 'toco' found

我正在尝试将我新训练的 mobilenet 模型转换为 tflite,以便按照 Google 代码实验室将其与 Android 应用程序一起使用。 https://codelabs.developers.google.com/codelabs/tensorflow-for-poets-2-tflite/index.html#3

我在 Ubuntu 16.04 LTS Machine.It 说的

No command 'toco' found

Google 告诉我 toco 在 Windows 上不起作用,但我在 Ubuntu 机器上,我的 TensorFlow 非常适合训练和推理。

由于 TensorFlow 可以工作并且 toco 与 TensorFlow 一起出现,因此 toco 应该理想地工作,但事实并非如此。

It is installed as a command line script, with TensorFlow, so you can easily access it.

需要帮助解决 toco(TensorFlow Lite 优化转换器)的问题,以便我可以将我的模型转换为 .lite 文件并 运行 它在 Android 设备上。

问题出在TensorFlow的版本上。 TensorFlow Lite 是最近推出的,我没有检查 TensorFlow 的版本(使用的是 1.4)。在查看 GitHub 存储库后,我将我的 TensorFlow 版本更新为 1.7,其中包含 contrib 文件夹下的精简版相关模块。