Expand description
This crate provides Rust bindings for the
TensorFlow machine learning library.
If you aren’t sure how to use something, please see the examples folder.
Modules§
- eager
 - C API extensions to experiment with eager execution of kernels.
 - expr
 - This module builds computation graphs.
 - io
 - A module for reading and writing TFRecords, Tensorflow’s preferred on-disk data format.
 - ops
 - This module exposes functions for building standard operations.
 - train
 - This module supports building and training models.
 
Structs§
- Attr
Metadata  - AttrMetadata describes the value of an attribute on an operation.
 - BFloat16
 - BFloat16 provides a Rust type for BFloat16. Note that this is not the same as half::f16. BFloat16 is not an IEEE-754 16-bit float. See https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/framework/bfloat16.h for details.
 - Checkpoint
Maker  - This struct supports saving and restoring variables using Tensorflow checkpoints in SaveV2 format.
First, the user creates a 
CheckpointMakerattached to anScopeindicating the list of variables to be saved/restored. The CheckpointMaker lazily modifies the graph creating the nodes needed for saving/restoring. When one wants to save/restore from or into a session, one calls the save/restore methods - Device
 - Metadata about a device.
 - Fetch
Token  - An opaque token for retrieving an output from a computation.
 - Function
 - Function is a grouping of operations with defined inputs and outputs. Once created and added to graphs, functions can be invoked by creating an operation whose operation type matches the function name.
 - Function
Options  - Options that can be passed during function creation.
 - Graph
 - Represents a computation graph. Graphs may be shared between sessions. Graphs are thread-safe when used as directed.
 - Import
Graph DefOptions  ImportGraphDefOptionsholds options that can be passed toGraph::import_graph_def.- Import
Graph DefResults  - ImportGraphDefResults holds results that are generated by Graph::import_graph_def_with_results().
 - Input
 - A 
Inputis one end of a graph edge. It holds an operation and an index into the inputs of that operation. - Library
 - Dynamically loaded plugins. The C API doesn’t provide a way to unload libraries, so nothing happens when this goes out of scope.
 - Meta
Graph Def  - Contains data necessary to restart training, run inference. It can be used to serialize/de-serialize memory objects necessary for running computation in a graph when crossing the process boundary. It can be used for long term storage of graphs, cross-language execution of graphs, etc.
 - OpArg
Def  - An argument definition for a graph operation.
 - OpAttr
Def  - An attribute definition for a graph operation.
 - OpDef
 - A Graph operation exposed from an external plugin
 - OpList
 - Collection of OpDefs exposed from an external plugin
 - Operation
 - An 
Operationis a node in aGraph. It is a computation which accepts inputs and produces outputs. - Operation
Description  - An 
OperationDescriptionis anOperationin the process of being built (i.e. the builder pattern). - Operation
Iter  - Iterator over the operations in a 
Graph. - Output
 - A 
Outputis one end of a graph edge. It holds an operation and an index into the outputs of that operation. - Output
Name  - Names a specific Output in the graph.
 - Pluggable
Device Library  - PluggableDeviceLibrary handler.
 - QInt8
 - Quantized type for i8.
 - QInt16
 - Quantized type for i16.
 - QInt32
 - Quantized type for i32.
 - QUInt8
 - Quantized type for u8.
 - QUInt16
 - Quantized type for u16.
 - Save
Model Error  - Error generated while saving a model.
 - Saved
Model Builder  - Builds a SavedModelSaver, which can be used to save models.
 - Saved
Model Bundle  - Aggregation type for a saved model bundle.
 - Saved
Model Saver  - Creates saved models. Use a SavedModelBuilder to create a SavedModelSaver.
 - Scope
 - A 
Scopeobject represents a set of related TensorFlow ops that have the same properties such as a common name prefix. - Session
 - Manages a single graph and execution.
 - Session
Options  - Options that can be passed during session creation.
 - Session
RunArgs  - Manages the inputs and outputs for a single execution of a graph.
 - Shape
 - A Shape is the shape of a tensor. A Shape may be an unknown rank, or it may have a known rank with each dimension being known or unknown.
 - Signature
Def  - SignatureDef defines the signature of a computation supported by a TensorFlow graph.
 - Status
 - Holds error information when communicating with back and forth with 
tensorflow. - Tensor
 - Holds a multi-dimensional array of elements of a single data type.
 - Tensor
Info  - Information about a Tensor necessary for feeding or retrieval.
 - Variable
 - Holds state in the form of a tensor that persists across steps.
 - Variable
Builder  - Builds a Variable.
 - While
Builder  - A WhileBuilder is used to build a while loop.
 
Enums§
- Attr
Type  - Describes the type of the value of an attribute on an operation.
 - Code
 - Error values that can be returned.
 - Data
Type  - Type of a single tensor element.
 
Constants§
- CLASSIFY_
INPUTS  - Classification inputs.
 - CLASSIFY_
METHOD_ NAME  - Classification method name used in a SignatureDef.
 - CLASSIFY_
OUTPUT_ CLASSES  - Classification classes output.
 - CLASSIFY_
OUTPUT_ SCORES  - Classification scores output.
 - DEFAULT_
SERVING_ SIGNATURE_ DEF_ KEY  - Key in the signature def map for 
defaultserving signatures. The default signature is used in inference requests where a specific signature was not specified. - PREDICT_
INPUTS  - Predict inputs.
 - PREDICT_
METHOD_ NAME  - Prediction method name used in a SignatureDef.
 - PREDICT_
OUTPUTS  - Predict outputs.
 - REGRESS_
INPUTS  - Regression inputs.
 - REGRESS_
METHOD_ NAME  - Regression method name used in a SignatureDef.
 - REGRESS_
OUTPUTS  - Regression outputs.
 
Traits§
- Tensor
Type  - A Rust type that maps to a 
DataType. 
Functions§
- get_
all_ registered_ kernels  - Returns a serialized KernelList protocol buffer containing KernelDefs for all registered kernels.
 - get_
registered_ kernels_ for_ op  - Returns a serialized KernelList protocol buffer containing KernelDefs for
all kernels registered for the operation named 
name. - version
 - Returns a string describing version information of the
TensorFlowlibrary.TensorFlowis using semantic versioning. 
Type Aliases§
- Output
Token Deprecated  - Deprecated alias for FetchToken.
 - Result
 - Convenience type for 
ResultwithStatusas the error type. - Step
With Graph Deprecated  - Deprecated alias for SessionRunArgs.