See: Description
Interface  Description 

FeatureConverter  
OutputConverter<T extends Output<T>> 
Converts the
Output into a Tensor and vice versa. 
Class  Description 

DenseFeatureConverter 
Converts a sparse example into a dense float vector, then wraps it in a
TFloat32 . 
ImageConverter 
Image converter.

LabelConverter 
Can convert a
Label into a Tensor containing one hot encoding of the label and
can convert a TFloat16 or TFloat32 into a Prediction or a Label . 
MultiLabelConverter 
Can convert a
MultiLabel into a Tensor containing a binary encoding of the label vector and
can convert a TFloat16 or TFloat32 into a Prediction or a MultiLabel . 
RegressorConverter  
TensorFlowCheckpointModel<T extends Output<T>> 
This model encapsulates a simple model with an input feed dict,
and produces a single output tensor.

TensorFlowFrozenExternalModel<T extends Output<T>> 
A Tribuo wrapper around a TensorFlow frozen model.

TensorFlowModel<T extends Output<T>> 
Base class for a TensorFlow model that operates on
Example s. 
TensorFlowNativeModel<T extends Output<T>> 
This model encapsulates a TensorFlow model running in graph mode with a single tensor output.

TensorFlowSavedModelExternalModel<T extends Output<T>> 
A Tribuo wrapper around a TensorFlow saved model bundle.

TensorFlowTrainer<T extends Output<T>> 
Trainer for TensorFlow.

TensorFlowTrainer.TensorFlowTrainerProvenance  
TensorFlowUtil 
Helper functions for working with TensorFlow.

TensorFlowUtil.TensorTuple 
A serializable tuple containing the tensor class name, the shape and the data.

TensorMap 
A map of names and tensors to feed into a session.

TrainTest 
Build and run a Tensorflow multiclass classifier for a standard dataset.

TrainTest.TensorflowOptions 
Options for training a model in TensorFlow.

Enum  Description 

GradientOptimiser 
An enum for the gradient optimisers exposed by TensorFlowJava.

TensorFlowTrainer.TFModelFormat 
The model format to emit.

TrainTest.InputType 
Type of feature extractor.

org.tribuo.interop.tensorflow.sequence
.
Tribuo's TensorFlow support operates in Graph mode, as in v0.3.1 that is the only way to access gradients. The set of supported gradients is determined by TensorFlow, and not all gradients are available in TensorFlow Java in v0.3.1. Unsupported gradients will trigger an exception when the train method is called.
Models can store their trained parameters in two ways, either inside the Tribuo serialized model file
(using TensorFlowTrainer.TFModelFormat.TRIBUO_NATIVE
) or as a
TensorFlow checkpoint folder on disk (using TensorFlowTrainer.TFModelFormat.CHECKPOINT
).
The choice is made at training time, as they result in slightly different TF graph structures.
Similarly there are two supported kinds of ExternalModel
for TensorFlow,
TensorFlowSavedModelExternalModel
which loads a SavedModelBundle
and always reads from that path, and TensorFlowFrozenExternalModel
which
loads a TensorFlow v1 frozen graph and stores the graph inside the Tribuo serialized object.
There are two main interfaces for interacting with TensorFlow Tensors,
FeatureConverter
and
OutputConverter
, with
provide conversions to and from Tribuo's features and outputs respectively. There
are implementations of a dense feature transformation and one for images as 3d arrays,
along with output converters for Label
Regressor
, and MultiLabel
.
The loss function and output transformation used is controlled by the OutputConverter
,
if a different one is desired then users are recommended to implement that interface separately.
N.B. TensorFlow support is experimental and may change without a major version bump.
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.