Interface ExampleTransformer<T extends Output<T>>
- All Superinterfaces:
com.oracle.labs.mlrg.olcut.config.Configurable,com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>,Serializable
- All Known Implementing Classes:
DenseTransformer,ImageTransformer
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
TensorFlow support is experimental, and may change without a major version bump.
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.
-
Method Summary
Modifier and TypeMethodDescriptionorg.tensorflow.Tensor<?> transform(List<Example<T>> example, ImmutableFeatureMap featureIDMap) Converts a batch ofExamples into a singleTensorsuitable for supplying as an input to a graph.org.tensorflow.Tensor<?> transform(List<SparseVector> vectors) Converts a list ofSparseVectors representing a batch of features into aTensor.org.tensorflow.Tensor<?> transform(Example<T> example, ImmutableFeatureMap featureIDMap) Converts anExampleinto aTensorsuitable for supplying as an input to a graph.org.tensorflow.Tensor<?> transform(SparseVector vector) Converts aSparseVectorrepresenting the features into aTensor.Methods inherited from interface com.oracle.labs.mlrg.olcut.config.Configurable
postConfigMethods inherited from interface com.oracle.labs.mlrg.olcut.provenance.Provenancable
getProvenance
-
Method Details
-
transform
Converts anExampleinto aTensorsuitable for supplying as an input to a graph.It generates it as a single example minibatch.
- Parameters:
example- The example to convert.featureIDMap- The id map to convert feature names into id numbers.- Returns:
- A dense Tensor representing this example.
-
transform
Converts a batch ofExamples into a singleTensorsuitable for supplying as an input to a graph.- Parameters:
example- The examples to convert.featureIDMap- THe id map to convert feature names into id numbers.- Returns:
- A dense Tensor representing this minibatch.
-
transform
Converts aSparseVectorrepresenting the features into aTensor.It generates it as a single example minibatch.
- Parameters:
vector- The features to convert.- Returns:
- A dense Tensor representing this vector.
-
transform
Converts a list ofSparseVectors representing a batch of features into aTensor.- Parameters:
vectors- The batch of features to convert.- Returns:
- A dense Tensor representing this minibatch.
-