为 Android 构建 Tensorflow 演示

Build Tensorflow Demo For Android

我正在关注此 link 以构建 Android 应用程序:

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/android/README.md

我正在使用 Window 子系统 Linux 命令来完成这个项目。

我已经安装了 Bazel。

我知道在我安装 Bazel 之后,在我 运行 构建命令之前,我需要用正确的 NDK/ADK 文件地址更改 WORKSPACE 文件并转到工作区根目录和 运行 "touch WORKSPACE"。这是我的代码 运行:

'tensorflow folder sits inside 'C:\Users\username\AppData\Local\lxss\home\alexluk\tensorflow
cd /home/username/tensorflow     

touch WORKSPACE

但是,当我 运行 "touch WORKSPACE" 时,这是我得到的错误:

touch: cannont touch 'WORKSPACE': onput/output error

如果有人能告诉我哪里出了问题,我该怎么办,那就太好了。

致未来可能需要这方面帮助的人:

看起来 Windows 子系统 Linux 非常讲究不编辑 Windows 中的 Linux 文件。见 this blog post:

DO NOT, under ANY circumstances, create and/or modify Linux files using Windows apps, tools, scripts, consoles, etc.

此时,您或许可以使用 Windows 删除该文件,然后使用 Linux.

重新创建它