public class ImageTransformer<T extends Output<T>> extends Object implements ExampleTransformer<T>
Constructor and Description |
---|
ImageTransformer(int width,
int height,
int channels) |
Modifier and Type | Method and Description |
---|---|
com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance |
getProvenance() |
void |
postConfig()
Used by the OLCUT configuration system, and should not be called by external code.
|
String |
toString() |
org.tensorflow.Tensor<?> |
transform(Example<T> example,
ImmutableFeatureMap featureIDMap)
Transform implicitly pads unseen values with zero.
|
org.tensorflow.Tensor<?> |
transform(List<Example<T>> examples,
ImmutableFeatureMap featureIDMap)
Transform implicitly pads unseen values with zero.
|
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 . |
public void postConfig()
postConfig
in interface com.oracle.labs.mlrg.olcut.config.Configurable
public org.tensorflow.Tensor<?> transform(Example<T> example, ImmutableFeatureMap featureIDMap)
transform
in interface ExampleTransformer<T extends Output<T>>
example
- The example to transform.featureIDMap
- The feature id mapping to use.public org.tensorflow.Tensor<?> transform(List<Example<T>> examples, ImmutableFeatureMap featureIDMap)
Converts a batch of examples into a Tensor.
transform
in interface ExampleTransformer<T extends Output<T>>
examples
- The examples to transform.featureIDMap
- The feature id mapping to use.public org.tensorflow.Tensor<?> transform(SparseVector vector)
ExampleTransformer
SparseVector
representing the features into a Tensor
.
It generates it as a single example minibatch.
transform
in interface ExampleTransformer<T extends Output<T>>
vector
- The features to convert.public org.tensorflow.Tensor<?> transform(List<SparseVector> vectors)
ExampleTransformer
SparseVector
s representing a batch of features into a Tensor
.
transform
in interface ExampleTransformer<T extends Output<T>>
vectors
- The batch of features to convert.public com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance getProvenance()
getProvenance
in interface com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.