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
Converts the Output
into a Tensor
and vice versa.
Modifier and Type | Method and Description |
---|---|
boolean |
generatesProbabilities()
Does this OutputTransformer generate probabilities.
|
org.tensorflow.Tensor<?> |
transform(List<Example<T>> examples,
ImmutableOutputInfo<T> outputIDInfo)
Converts a list of
Example into a Tensor representing all the outputs
in the list. |
org.tensorflow.Tensor<?> |
transform(T output,
ImmutableOutputInfo<T> outputIDInfo)
Converts an
Output into a Tensor representing it's output. |
List<T> |
transformToBatchOutput(org.tensorflow.Tensor<?> tensor,
ImmutableOutputInfo<T> outputIDInfo)
Converts a
Tensor containing multiple outputs into a list of Output s. |
List<Prediction<T>> |
transformToBatchPrediction(org.tensorflow.Tensor<?> tensor,
ImmutableOutputInfo<T> outputIDInfo,
int[] numValidFeatures,
List<Example<T>> examples)
Converts a
Tensor containing multiple outputs into a list of Prediction s. |
T |
transformToOutput(org.tensorflow.Tensor<?> tensor,
ImmutableOutputInfo<T> outputIDInfo)
Converts a
Tensor into the specified output type. |
Prediction<T> |
transformToPrediction(org.tensorflow.Tensor<?> tensor,
ImmutableOutputInfo<T> outputIDInfo,
int numValidFeatures,
Example<T> example)
Converts a
Tensor into a Prediction . |
Prediction<T> transformToPrediction(org.tensorflow.Tensor<?> tensor, ImmutableOutputInfo<T> outputIDInfo, int numValidFeatures, Example<T> example)
Tensor
into a Prediction
.tensor
- The tensor 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(org.tensorflow.Tensor<?> tensor, ImmutableOutputInfo<T> outputIDInfo)
Tensor
into the specified output type.tensor
- The tensor to convert.outputIDInfo
- The output info to use to identify the outputs.List<Prediction<T>> transformToBatchPrediction(org.tensorflow.Tensor<?> tensor, ImmutableOutputInfo<T> outputIDInfo, int[] numValidFeatures, List<Example<T>> examples)
Tensor
containing multiple outputs into a list of Prediction
s.tensor
- The tensor 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(org.tensorflow.Tensor<?> tensor, ImmutableOutputInfo<T> outputIDInfo)
Tensor
containing multiple outputs into a list of Output
s.tensor
- The tensor to convert.outputIDInfo
- The output info to use to identify the outputs.org.tensorflow.Tensor<?> transform(T output, ImmutableOutputInfo<T> outputIDInfo)
Output
into a Tensor
representing it's output.output
- The output to convert.outputIDInfo
- The output info to use to identify the outputs.org.tensorflow.Tensor<?> transform(List<Example<T>> examples, ImmutableOutputInfo<T> outputIDInfo)
Example
into a Tensor
representing all the outputs
in the list. It accepts a list of Example rather than a list of Output for efficiency reasons.examples
- The examples 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.