Class TensorflowCheckpointModel<T extends Output<T>>
- All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.provenance.Provenancable<ModelProvenance>,Closeable,Serializable,AutoCloseable
This model encapsulates a simple model with a single input tensor (labelled TensorflowModel.INPUT_NAME),
and produces a single output tensor (labelled TensorflowModel.OUTPUT_NAME).
It accepts an ExampleTransformer that converts an example's features into a Tensor, and an
OutputTransformer that converts a Tensor into a Prediction.
The model's serialVersionUID is set to the major Tensorflow version number times 100.
N.B. Tensorflow support is experimental and may change without a major version bump.
- See Also:
-
Field Summary
Fields inherited from class org.tribuo.Model
ALL_OUTPUTS, BIAS_FEATURE, featureIDMap, generatesProbabilities, name, outputIDInfo, provenance, provenanceOutput -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected TensorflowCheckpointModel<T> copy(String newName, ModelProvenance newProvenance) Copies a model, replacing it's provenance and name with the supplied values.Deep learning models don't do excuses.getTopFeatures(int n) Deep learning models don't do feature rankings.Uses the model to predict the output for a single example.Methods inherited from class org.tribuo.Model
copy, generatesProbabilities, getExcuses, getFeatureIDMap, getName, getOutputIDInfo, getProvenance, innerPredict, predict, predict, setName, toString, validate
-
Method Details
-
predict
Description copied from class:ModelUses the model to predict the output for a single example.predict does not mutate the example.
Throws
IllegalArgumentExceptionif the example has no features or no feature overlap with the model. -
getTopFeatures
Deep learning models don't do feature rankings. Use an Explainer.This method always returns the empty map.
- Specified by:
getTopFeaturesin classModel<T extends Output<T>>- Parameters:
n- the number of features to return.- Returns:
- The empty map.
-
getExcuse
-
copy
Description copied from class:ModelCopies a model, replacing it's provenance and name with the supplied values.Used to provide the provenance removal functionality.
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-