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
TensorFlowTrainer.TFModelFormat.TRIBUO_NATIVE) or as a
TensorFlow checkpoint folder on disk (using
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
and always reads from that path, and
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,
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
The loss function and output transformation used is controlled by the
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.
ClassDescriptionConverts a sparse example into a dense float vector, then wraps it in a
TFloat32.An enum for the gradient optimisers exposed by TensorFlow-Java.Image converter.Converts the
Tensorand vice versa.This model encapsulates a simple model with an input feed dict, and produces a single output tensor.A Tribuo wrapper around a TensorFlow frozen model.Base class for a TensorFlow model that operates on
Examples.This model encapsulates a TensorFlow model running in graph mode with a single tensor output.A Tribuo wrapper around a TensorFlow saved model bundle.Trainer for TensorFlow.Provenance for
TensorFlowTrainer.The model format to emit.Helper functions for working with TensorFlow.A serializable tuple containing the tensor class name, the shape and the data.A map of names and tensors to feed into a session.Build and run a Tensorflow multi-class classifier for a standard dataset.Type of feature extractor.Options for training a model in TensorFlow.