public interface OutputTransformer<T extends Output<T>> extends com.oracle.labs.mlrg.olcut.config.Configurable, com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>, Serializable
OnnxValue
into an Output
or a Prediction
.
N.B. ONNX support is experimental, and may change without a major version bump.
Modifier and Type | Method and Description |
---|---|
boolean |
generatesProbabilities()
Does this OutputTransformer generate probabilities.
|
List<T> |
transformToBatchOutput(List<ai.onnxruntime.OnnxValue> value,
ImmutableOutputInfo<T> outputIDInfo)
Converts a
OnnxValue containing multiple outputs into a list of Output s. |
List<Prediction<T>> |
transformToBatchPrediction(List<ai.onnxruntime.OnnxValue> value,
ImmutableOutputInfo<T> outputIDInfo,
int[] numValidFeatures,
List<Example<T>> examples)
Converts a
OnnxValue containing multiple outputs into a list of Prediction s. |
T |
transformToOutput(List<ai.onnxruntime.OnnxValue> value,
ImmutableOutputInfo<T> outputIDInfo)
Converts a
OnnxValue into the specified output type. |
Prediction<T> |
transformToPrediction(List<ai.onnxruntime.OnnxValue> value,
ImmutableOutputInfo<T> outputIDInfo,
int numValidFeatures,
Example<T> example)
Converts a
OnnxValue into a Prediction . |
Prediction<T> transformToPrediction(List<ai.onnxruntime.OnnxValue> value, ImmutableOutputInfo<T> outputIDInfo, int numValidFeatures, Example<T> example)
OnnxValue
into a Prediction
.value
- The value to convert.outputIDInfo
- The output info to use to identify the outputs.numValidFeatures
- The number of valid features used by the prediction.example
- The example to insert into the prediction.T transformToOutput(List<ai.onnxruntime.OnnxValue> value, ImmutableOutputInfo<T> outputIDInfo)
OnnxValue
into the specified output type.value
- The value to convert.outputIDInfo
- The output info to use to identify the outputs.List<Prediction<T>> transformToBatchPrediction(List<ai.onnxruntime.OnnxValue> value, ImmutableOutputInfo<T> outputIDInfo, int[] numValidFeatures, List<Example<T>> examples)
OnnxValue
containing multiple outputs into a list of Prediction
s.value
- The value to convert.outputIDInfo
- The output info to use to identify the outputs.numValidFeatures
- The number of valid features used by the prediction.examples
- The example to insert into the prediction.List<T> transformToBatchOutput(List<ai.onnxruntime.OnnxValue> value, ImmutableOutputInfo<T> outputIDInfo)
OnnxValue
containing multiple outputs into a list of Output
s.value
- The value to convert.outputIDInfo
- The output info to use to identify the outputs.boolean generatesProbabilities()
Prediction
.Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.