更新时间:2023-11-23 09:33:46
TensorFlow 存储库有一些 Makefile 可用于构建静态库(请参阅 tensorflow/contrib/Makefile).
The TensorFlow repository has some Makefiles you can use to build a static library (see tensorflow/contrib/Makefile).
或者,您可以使用 bazel
构建 TensorFlow C++ 共享库,然后在您的应用程序中加载和使用共享库(bazel build -c opt//tensorflow:libtensorflow_cc.so
).不幸的是,bazel 还不能生成静态库(#1920).
Alternatively, you could use bazel
to build the TensorFlow C++ shared library and then load and use the shared library in your application (bazel build -c opt //tensorflow:libtensorflow_cc.so
). Unfortunately, bazel can't yet produce a static library (#1920).
希望有所帮助.