建筑Tensorflow

时间:2018-06-23 13:12:52

标签: android tensorflow

我想为我的Android智能手机构建tensorflow。因此,我已经安装了bazel并获得了tensorflow的源代码。

git clone https://github.com/tensorflow/tensorflow

我使用NDK和SDK的路径修改WORKSPACE文件

android_sdk_repository(
    name = "androidsdk",
    api_level = 27,
    build_tools_version = "27.0.3",
    # Replace with path to Android SDK on your system
    path = ".../AppData/Local/Android/Sdk",
)

android_ndk_repository(
    name = "androidndk",
    path = .../AppData/Local/Android/Sdk/ndk-bundle",
    api_level = 27
)

现在我运行淡褐色

bazel build -c opt //tensorflow/contrib/android:libtensorflow_inference.so \ --crosstool_top=//external:android/crosstool \ --host_crosstool_top=@bazel_tools//tools/cpp:toolchain \ --cpu=armeabi-v7a

并收到此错误

fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. Target //tensorflow/contrib/android:libtensorflow_inference.so failed to build Use --verbose_failures to see the command lines of failed build steps. INFO: Elapsed time: 72,096s, Critical Path: 14,55s INFO: 213 processes, local. FAILED: Build did NOT complete successfully FAILED: Build did NOT complete successfully

我该如何在Windows(或ubuntu)上为Android编译te​​nsorflow?

0 个答案:

没有答案