TensorFlow r1.0 C++ API comes with Session
and ClientSession
classes. Some of the examples shipping with TensorFlow use ClientSession
and
In TensorFlow's C++ API, the tensorflow::Session API is a low-level interface that deals with serialized GraphDef
protocol buffers and provides a string-based interface for running subgraphs.
By contrast, the tensorflow::ClientSession API is higher level, and integrates with the new C++ API for building TensorFlow graphs—much in the same way as the Python tf.Graph and tf.Session classes do.
Therefore, you will probably want to use a tensorflow::ClientSession
if you are building the graph with the C++ API, but the tensorflow::Session
interface is easier to use if you already have a serialized GraphDef
(representing e.g. a pre-trained model) and just want to run inference on that model.