android - 为 Tensorflow 编译 Android 示例

标签 android android-ndk tensorflow deep-learning bazel

在 Android 应用程序中使用 Tensorflow 模型的官方示例中:github link他们提到在 <workspace_root>/WORKSPACE 中更改条目.

我不知道这是哪个文件,也不知道在哪里可以找到它。我习惯在 Android Studio 上开发 Android 应用程序,从未使用过 workspace以前在 Android 中。

当他们说:

时,请告诉我他们指的是哪个文件

The Android entries in <workspace_root>/WORKSPACE must be uncommented with the paths filled in appropriately depending on where you installed the NDK and SDK.

在哪里可以找到它!

最佳答案

WORSPACE 是 Bazel 的文件。它是TensorFlow source repository 家的一个文本文件。 .该文件确实在顶部包含一个部分,目前:

# Uncomment and update the paths in these entries to build the Android demo.
#android_sdk_repository(
#    name = "androidsdk",
#    api_level = 23,
#    build_tools_version = "23.0.1",
#    # Replace with path to Android SDK on your system
#    path = "<PATH_TO_SDK>",
#)
#
#android_ndk_repository(
#    name="androidndk",
#    path="<PATH_TO_NDK>",
#    api_level=21)

关于android - 为 Tensorflow 编译 Android 示例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40817243/

相关文章:

android - 如何将 android studio 项目从 linux 移植到 windows

android - 无法解析 `` ?attr/actionBarSize``

Android HLS 播放 : Passing url parameters as headers in Mediaplayer. setDataSource() 无法正常工作

android - 在 Release模式下崩溃,但如果可调试为真 - 不是......可能的问题是什么?

tensorflow - 如何在 tensorflow 对象检测中使用指数学习率?

python - 从迭代器创建 `input_fn`

java - Android Studio - 定时器

android - 通过代理连接到 Spotify 应用程序,未找到主机,错误 4

android - 错误:错误:找不到(3,10) 'opencv2/opencv.hpp'文件

python - 使用 tensorflow 训练对象检测模型时,错误索引[0] = 0 不在 [0, 0) 中