要在Tensorflow加载图c ++示例中包含哪些标头?

时间:2016-04-11 17:02:15

标签: c++ graph header tensorflow

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

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

1 个答案:

答案 0 :(得分:1)

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

#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