public interface ExampleTransformer<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
Transforms an Example
, extracting the features from it as a Tensor
.
This usually densifies the example, so can be a lot larger than the input example.
Modifier and Type | Method and Description |
---|---|
org.tensorflow.Tensor<?> |
transform(Example<T> example,
ImmutableFeatureMap featureIDMap)
Converts an
Example into a Tensor suitable for supplying as an input to a graph. |
org.tensorflow.Tensor<?> |
transform(List<Example<T>> example,
ImmutableFeatureMap featureIDMap)
Converts a batch of
Example s into a single Tensor suitable for supplying as
an input to a graph. |
org.tensorflow.Tensor<?> |
transform(List<SparseVector> vectors)
Converts a list of
SparseVector s representing a batch of features into a Tensor . |
org.tensorflow.Tensor<?> |
transform(SparseVector vector)
Converts a
SparseVector representing the features into a Tensor . |
org.tensorflow.Tensor<?> transform(Example<T> example, ImmutableFeatureMap featureIDMap)
Example
into a Tensor
suitable for supplying as an input to a graph.
It generates it as a single example minibatch.
example
- The example to convert.featureIDMap
- The id map to convert feature names into id numbers.org.tensorflow.Tensor<?> transform(List<Example<T>> example, ImmutableFeatureMap featureIDMap)
Example
s into a single Tensor
suitable for supplying as
an input to a graph.example
- The examples to convert.featureIDMap
- THe id map to convert feature names into id numbers.org.tensorflow.Tensor<?> transform(SparseVector vector)
SparseVector
representing the features into a Tensor
.
It generates it as a single example minibatch.
vector
- The features to convert.org.tensorflow.Tensor<?> transform(List<SparseVector> vectors)
SparseVector
s representing a batch of features into a Tensor
.
vectors
- The batch of features to convert.Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.