【问题标题】:tensorflow porting to android devicestensorflow 移植到安卓设备
【发布时间】:2017-01-22 02:56:44
【问题描述】:

我有一个关于将 tensorflow 移植到 android 设备的问题。我在centos的时候,使用bazel编译生成apk文件,提示如下错误:

错误:/data/tensorflow-master/WORKSPACE:37:1:“tf_workspace”处的语法错误:预期, 错误:/data/tensorflow-master/WORKSPACE:44:1:关键字 arg 之后的非关键字 arg。 错误:加载包“外部”时出错:无法解析 WORKSPACE 文件。 信息:经过时间:0.242s

以下是WORKSPACE文件的37-44行:

请在 workspace.bzl 中添加所有新的 TensorFlow 依赖项。

37 tf_workspace()

38

39 new_http_archive (

40 name = "inception5h",

41 build_file = "models.BUILD",

42 url = "https://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip",

43 sha256 = "d13569f6a98159de37e92e9c8ec4dae8f674fbf475f69fe6199b514f756d4364"

44)

请问你有遇到过类似的问题吗?请帮帮我。

【问题讨论】:

    标签: android tensorflow


    【解决方案1】:

    我遇到了同样的问题,我就是这样解决的:

    # Uncomment and update the paths in these entries to build the Android demo.
    android_sdk_repository(
        name = "androidsdk",
        api_level = 24,
    #    # Ensure that you have the build_tools_version below installed in the
    #    # SDK manager as it updates periodically.
        build_tools_version = "25.0.3",
    #    # Replace with path to Android SDK on your system
        path = "/home/yours/Android/Sdk/",
    ) #my mistake #) --> )
    #
    # Android NDK r12b is recommended (higher may cause issues with Bazel)
    android_ndk_repository(
        name="androidndk",
        path="/home/yours/android-ndk-r12b/",
    #    # This needs to be 14 or higher to compile TensorFlow.
    #    # Note that the NDK version is not the API level.
        api_level=14)
    

    【讨论】:

      猜你喜欢
      • 2014-07-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-15
      • 1970-01-01
      • 1970-01-01
      • 2014-03-06
      相关资源
      最近更新 更多