In the TensorFlow C ++ API, the tensorflow::Session API is a low-level interface that deals with the serialized GraphDef protocol GraphDef and provides a line-based interface for running subgraphs.
Unlike tensorflow::ClientSession API is a higher level and integrates with the new C ++ API for building TensorFlow charts - much in the same way as the Python tf.Graph and tf.Session classes do.
Therefore, you probably want to use tensorflow::ClientSession if you are building a graph using the C ++ API, but tensorflow::Session easier to use if you already have a serialized GraphDef (representing, for example, a pre -trained model ) and just want to make a conclusion to this model.
source share