gpt4 book ai didi

java - Windows 中的 Tensorflow Java API

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:35:58 25 4
gpt4 key购买 nike

我试图在 Windows 中为 java 配置 Tensorflow API。

根据阅读我 https://github.com/tensorflow/tensorflow/blob/master/tensorflow/java/README.md

它说我们必须构建 native 库将需要从 Windows 的源代码构建。但它没有详细的说明。有人有幸编译它吗?有什么我可以遵循的步骤吗?

最佳答案

来自官方website :

We don't officially support building TensorFlow on Windows; however, you may try to build TensorFlow on Windows if you don't mind using the highly experimental Bazel on Windows or TensorFlow CMake build.

此外,还有一个相关的 github 问题:https://github.com/tensorflow/tensorflow/issues/17 ,一位用户 rongjiecomputer 提到(2016 年 9 月):

Tensorflow requires Bazel to build from source, If I am not mistaken, Bazel is a build system like GNU Make, but not a compiler.

Based on what I saw as I briefly scanned through the code, source code of Tensorflow itself uses mostly standard C++ library for things like threading so it should be no problem to compile on Windows, essential third-party libraries it uses all have Windows support.

Therefore, I think the main problem lies on lack of build method for Windows rather than source code itself. There are works on using CMake to build instead of Bazel but not complete yet. If someone can translate Bazel build rules to CMake's, I think we will be able to build it on Windows.

所以我假设,如果 Bazel Windows 正常运行,您可以按照与使用 Bazel 在其他平台上构建它相同的步骤进行操作。不过我自己还没有尝试过。

关于java - Windows 中的 Tensorflow Java API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42551391/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com