Defines classes to build, save, load and execute TensorFlow models.

WARNING: The API is currently experimental and is not covered by TensorFlow API stability guarantees. See for installation instructions.

The LabelImage example demonstrates use of this API to classify images using a pre-trained Inception architecture convolutional neural network. It demonstrates:

  • Graph construction: using the OperationBuilder class to construct a graph to decode, resize and normalize a JPEG image.
  • Model loading: Using Graph.importGraphDef() to load a pre-trained Inception model.
  • Graph execution: Using a Session to execute the graphs and find the best label for an image.

Additional examples can be found in the tensorflow/models GitHub repository.


Input<T> Interface implemented by operands of a TensorFlow operation. 
Operand<T> Interface implemented by operands of a TensorFlow operation. 


Graph A data flow graph representing a TensorFlow computation. 
Operation A Graph node that performs computation on Tensors. 
OperationBuilder A builder for Operations in a Graph
Output<T> A symbolic handle to a tensor produced by an Operation
SavedModelBundle SavedModelBundle represents a model loaded from storage. 
Session Driver for Graph execution. 
Session.Run Output tensors and metadata obtained when executing a session. 
Session.Runner Run Operations and evaluate Tensors. 
Shape The possibly partially known shape of a tensor produced by an operation. 
Tensor<T> A statically typed multi-dimensional array whose elements are of a type described by T. 
TensorFlow Static utility methods describing the TensorFlow runtime. 
Tensors Type-safe factory methods for creating Tensor objects. 


DataType Represents the type of elements in a Tensor as an enum. 


TensorFlowException Unchecked exception thrown when executing TensorFlow Graphs.