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 ofExample
s into a singleTensor
suitable for supplying as an input to a graph.org.tensorflow.Tensor
<?> transform
(List<SparseVector> vectors) Converts a list ofSparseVector
s representing a batch of features into aTensor
.org.tensorflow.Tensor
<?> transform
(Example<T> example, ImmutableFeatureMap featureIDMap) Converts anExample
into aTensor
suitable for supplying as an input to a graph.org.tensorflow.Tensor
<?> transform
(SparseVector vector) Converts aSparseVector
representing the features into aTensor
.Methods inherited from interface com.oracle.labs.mlrg.olcut.config.Configurable
postConfig
Methods inherited from interface com.oracle.labs.mlrg.olcut.provenance.Provenancable
getProvenance
-
Method Details
-
transform
Converts anExample
into aTensor
suitable 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 ofExample
s into a singleTensor
suitable 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 aSparseVector
representing 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 ofSparseVector
s representing a batch of features into aTensor
.- Parameters:
vectors
- The batch of features to convert.- Returns:
- A dense Tensor representing this minibatch.
-