简体   繁体   English

在Android gnuroot上安装Tensorflow Python API

[英]Install tensorflow python API on Android gnuroot

I've installed Debian+python on an android table with GNURoot. 我已经用GNURoot在Android表上安装了Debian + python。 Now I'm trying to install tensorflow python API, so that I can "import tensorflow" in my python code. 现在我正在尝试安装tensorflow python API,以便可以在我的python代码中``导入tensorflow''。 My tablet CPU is arm 32 bits, so I can not install with pip because tensorflow only supports 64 bits. 我的平板电脑CPU是32位臂,因此我无法安装pip,因为tensorflow仅支持64位。

I thus try to compile tensorflow from source. 因此,我尝试从源代码编译张量流。 Tensorflow build system is Bazel, and I've not found any Bazel executable for linux arm 32 bits. Tensorflow构建系统是Bazel,但我还没有找到用于Linux arm 32位的任何Bazel可执行文件。

So I try to compile Bazel from source. 因此,我尝试从源代码编译Bazel。 But "./compile.sh" fails with error "Protobuf compiler not found in third_party/protobuf/protoc-linux-arm32.exe" I'm a bit reluctant to try and compile protobuf from source, because I've read somewhere that protobuf master may not be work with bazel. 但是“ ./compile.sh”失败,并显示错误“ Protobuf编译器未在third_party / protobuf / protoc-linux-arm32.exe中找到”。 protobuf master可能不适用于bazel。

Is there an alternative way to install tensorflow on arm32 ? 有没有其他方法可以在arm32上安装tensorflow?

Unfortunately building TensorFlow Python requires Bazel (for just C++ inference you can use the instructions at tensorflow/contrib/makefile), and this is quite an involved and buggy process. 不幸的是,构建TensorFlow Python需要Bazel(仅用于C ++推理,您可以使用tensorflow / contrib / makefile中的说明),这是一个涉及到很多错误的过程。 The best place to start is this post on setting things up on the Jetson board: 最好的起点是这篇关于在Jetson板上进行设置的文章:

http://cudamusing.blogspot.com/2015/11/building-tensorflow-for-jetson-tk1.html http://cudamusing.blogspot.com/2015/11/building-tensorflow-for-jetson-tk1.html

If you want to play with Keras it is possible on gnuroot. 如果您想和Keras一起玩,可以在gnuroot上玩。 Instead of Tensorflow you can use Theano backend. 可以使用Theano后端代替Tensorflow。 I made it. 我做到了。

In this moment my Telefunken Outdoor WT4 phone is running it. 这时我的Telefunken Outdoor WT4手机正在运行

It is very slow but it is working. 这很慢,但是正在运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM