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 README.md 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.
Interfaces
ExecutionEnvironment | Defines an environment for creating and executing TensorFlow Operation s. |
Graph.WhileSubgraphBuilder | Used to instantiate an abstract class which overrides the buildSubgraph method to build a conditional or body subgraph for a while loop. |
Operand<T> | Interface implemented by operands of a TensorFlow operation. |
Operation | Performs computation on Tensors. |
OperationBuilder | A builder for Operation s. |
Classes
EagerSession | An environment for executing TensorFlow operations eagerly. |
EagerSession.Options | |
Graph | A data flow graph representing a TensorFlow computation. |
GraphOperation | Implementation for an Operation added as a node to a Graph . |
GraphOperationBuilder | An OperationBuilder for adding GraphOperation s to a Graph . |
Output<T> | A symbolic handle to a tensor produced by an Operation . |
SavedModelBundle | SavedModelBundle represents a model loaded from storage. |
SavedModelBundle.Loader | Options for loading a SavedModel. |
Server | An in-process TensorFlow server, for use in distributed training. |
Session | Driver for Graph execution. |
Session.Run | Output tensors and metadata obtained when executing a session. |
Session.Runner | Run Operation s and evaluate Tensor s. |
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. |
Enums
DataType | Represents the type of elements in a Tensor as an enum. |
EagerSession.DevicePlacementPolicy | Controls how to act when we try to run an operation on a given device but some input tensors are not on that device. |
EagerSession.ResourceCleanupStrategy | Controls how TensorFlow resources are cleaned up when they are no longer needed. |
Exceptions
TensorFlowException | Unchecked exception thrown when executing TensorFlow Graphs. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-04-21 UTC.
[null,null,["Last updated 2020-04-21 UTC."],[],[]]