【发布时间】:2017-12-20 12:55:42
【问题描述】:
我按照本教程的说明进行操作:
https://www.tensorflow.org/extend/adding_an_op#implement_the_gradient_in_python。
有这条评论提供:g++ -std=c++11 -shared zero_out.cc -o zero_out.so -fPIC -I$TF_INC -I$TF_INC/external/nsync/public -L$TF_LIB -ltensorflow_framework -O2
但是链接器找不到-ltensorflow_framework(应该是tensorflow_frameowork.so文件!?)
经过一番研究,我发现了以下链接:
- https://github.com/tensorflow/tensorflow/issues/1569
-
https://github.com/eaplatanios/tensorflow_scala/issues/26 --> 我下载了.jar 并通过
-l/pathto/tensorflow_framework.so链接它,仍然找不到fatal error: tensorflow/core/framework/op_kernel.h: No such file or directory。 - https://github.com/tensorflow/tensorflow/issues/1270 最后一条评论不起作用,所以对我没有帮助。
我尝试递归搜索sudo find /usr/. -name "tensorflow_framework.so",但我找不到任何东西。 Tensorflow 肯定是通过 anaconda 安装的,我还从源代码克隆和编译了存储库。
如何找到包含-ltensorflow_framework 的方法?
【问题讨论】:
标签: c++ c++11 ubuntu tensorflow