简体   繁体   English

构建Tensorflow R1.0 C ++ API

[英]Build Tensorflow r1.0 c++ API

I trying to build Tensorflow r1.0 for c++ I was able to compile the libtensorflow.so but not all the headers generated. 我试图为c ++构建Tensorflow r1.0,但我可以编译libtensorflow.so,但不能编译所有生成的标头。 All the ops headers missing except from standard_ops.h and const_ops.h which include in them all the ops headers that missing. 除了standard_ops.h和const_ops.h中所有缺少的ops标头之外,所有ops标头都丢失了。

Im using Ubuntu 16.04. 我正在使用Ubuntu 16.04。

Code for most ops is generated during the build. 在构建期间会生成大多数操作的代码。 When using bazel , you should fine the generated header files in: bazel-genfiles/tensorflow/cc/ops , eg, bazel-genfiles/tensorflow/cc/ops/math_ops.h . 使用bazel ,应在以下bazel-genfiles/tensorflow/cc/ops对生成的头文件进行bazel-genfiles/tensorflow/cc/opsbazel-genfiles/tensorflow/cc/ops ,例如bazel-genfiles/tensorflow/cc/ops/math_ops.h

Hope that helps. 希望能有所帮助。

If you don't mind using CMake, you can use tensorflow_cc project. 如果您不介意使用CMake,则可以使用tensorflow_cc项目。 It builds and installs TF C++ API for you, along with convenient CMake targets you can link against. 它为您构建和安装TF C ++ API,以及可以链接的便捷CMake目标。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM