在 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/