c++ - Tensorflow load graph c++ 示例中包含哪些 header ?

标签 c++ graph header tensorflow

Tensorflow 的 c++ API 看起来很简单,但我无法弄清楚在其页面上运行所示示例需要哪些头文件: https://www.tensorflow.org/versions/r0.7/api_docs/cc/index.html

如果我让它工作,这个 API 是否允许我使用我用 Python 构建的神经网络进行分类?

最佳答案

对于 header ,我会假设其中的一些子集:

#include "tensorflow/cc/ops/standard_ops.h"
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/framework/tensor.h"
#include "tensorflow/core/graph/default_device.h"
#include "tensorflow/core/graph/graph_def_builder.h"
#include "tensorflow/core/lib/core/threadpool.h"
#include "tensorflow/core/lib/strings/stringprintf.h"
#include "tensorflow/core/platform/init_main.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/types.h"
#include "tensorflow/core/public/session.h"

来自 https://github.com/tensorflow/tensorflow/blob/master/tensorflow/cc/tutorials/example_trainer.cc

关于c++ - Tensorflow load graph c++ 示例中包含哪些 header ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36554893/

相关文章:

c++ - 从 'int' 到 'int*' 的无效转换

algorithm - 每条路径中出现的最少边数

excel - 如何在Excel中创建百分比条形图,类似于 "100% stacked column",但只有一个变量与总值(value)

haskell - 如何在haskell中遍历图?

java - 更改调整 JTable 标题光标的大小

来自类的c++第二个函数无法访问第一个

c++ - "rvalue references for *this"是做什么用的?

c++ - gcc 在哪里寻找 C 和 C++ 头文件?

java - Java Native Interface (JNI) 是否受 C++ ABI 兼容性问题的影响?

c++ - 类枚举器值不能作为参数传递给另一个类的函数