public interface SequenceOutputTransformer<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
Modifier and Type | Method and Description |
---|---|
List<List<Prediction<T>>> |
decode(org.tensorflow.Tensor<?> outputs,
List<SequenceExample<T>> inputBatch,
ImmutableOutputInfo<T> labelMap)
Decode graph output tensors corresponding to a batch of input sequences.
|
List<Prediction<T>> |
decode(org.tensorflow.Tensor<?> output,
SequenceExample<T> input,
ImmutableOutputInfo<T> labelMap)
Decode a tensor of graph output into a list of predictions for the input sequence.
|
Map<String,org.tensorflow.Tensor<?>> |
encode(List<SequenceExample<T>> batch,
ImmutableOutputInfo<T> labelMap)
Encodes a batch of labels as a feed dict.
|
Map<String,org.tensorflow.Tensor<?>> |
encode(SequenceExample<T> example,
ImmutableOutputInfo<T> labelMap)
Encodes an example's label as a feed dict.
|
List<Prediction<T>> decode(org.tensorflow.Tensor<?> output, SequenceExample<T> input, ImmutableOutputInfo<T> labelMap)
output
- graph outputinput
- original input sequence examplelabelMap
- label domainList<List<Prediction<T>>> decode(org.tensorflow.Tensor<?> outputs, List<SequenceExample<T>> inputBatch, ImmutableOutputInfo<T> labelMap)
outputs
- a tensor corresponding to a batch of outputs.inputBatch
- the original input batch.labelMap
- label domainMap<String,org.tensorflow.Tensor<?>> encode(SequenceExample<T> example, ImmutableOutputInfo<T> labelMap)
example
- the input examplelabelMap
- label domainMap<String,org.tensorflow.Tensor<?>> encode(List<SequenceExample<T>> batch, ImmutableOutputInfo<T> labelMap)
batch
- a batch of examples.labelMap
- label domainCopyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.