我正在尝试在我的C++应用程序中使用TensorFlow作为外部库(主要是遵循这个教程)。到目前为止,我已经完成了以下工作:
- I have cloned the tensorflow reporitory (let's say, that the repo root dir is
$TENSORFLOW
) - Run
/.configure
(which all settings default, so no CUDA, no OpenCL etc.). - Build shared library with
bazel build -c /opt //tensorflow:libtensorflow_cc.so
(build completed successfully) Now I'm trying to
#include "tensorflow/core/public/session.h"
. But after including it (and adding$TENSORFLOW
and$TENSORFLOW/bazel-genfiles
to include path), I'm receiving error:$TENSORFLOW/tensorflow/third_party/eigen3/unsupported/Eigen/CXX11/Tensor:1:42: fatal error: unsupported/Eigen/CXX11/Tensor: No such file or directory
有一个Github问题与此类似,但标记为已关闭且未提供任何解决方案。我也尝试过使用master
分支以及v.1.4.0
版本。
你知道可能是什么原因导致这种问题,以及如何处理它吗?