Package org.tribuo.interop.tensorflow
Interface FeatureConverter
- All Superinterfaces:
com.oracle.labs.mlrg.olcut.config.Configurable
,ProtoSerializable<org.tribuo.interop.tensorflow.protos.FeatureConverterProto>
,com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
,Serializable
- All Known Implementing Classes:
DenseFeatureConverter
,ImageConverter
public interface FeatureConverter
extends com.oracle.labs.mlrg.olcut.config.Configurable, ProtoSerializable<org.tribuo.interop.tensorflow.protos.FeatureConverterProto>, com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>, Serializable
-
Field Summary
Fields inherited from interface org.tribuo.protos.ProtoSerializable
DESERIALIZATION_METHOD_NAME, PROVENANCE_SERIALIZER
-
Method Summary
Modifier and TypeMethodDescriptionconvert
(List<? extends Example<?>> example, ImmutableFeatureMap featureIDMap) convert
(Example<?> example, ImmutableFeatureMap featureIDMap) Gets a view of the names of the inputs this converter produces.Methods inherited from interface com.oracle.labs.mlrg.olcut.config.Configurable
postConfig
Methods inherited from interface org.tribuo.protos.ProtoSerializable
serialize
Methods inherited from interface com.oracle.labs.mlrg.olcut.provenance.Provenancable
getProvenance
-
Method Details
-
convert
Converts anExample
into aTensorMap
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 TensorMap (similar to a TF Python feed_dict) representing the features in this example.
-
convert
- Parameters:
example
- The examples to convert.featureIDMap
- THe id map to convert feature names into id numbers.- Returns:
- A TensorMap (similar to a TF Python feed_dict) representing the features in this minibatch.
-
convert
Converts aSGDVector
representing the features into aTensorMap
.It generates it as a single example minibatch.
- Parameters:
vector
- The features to convert.- Returns:
- A TensorMap (similar to a TF Python feed_dict) representing this vector.
-
convert
- Parameters:
vectors
- The batch of features to convert.- Returns:
- A TensorMap (similar to a TF Python feed_dict) representing this minibatch.
-
inputNamesSet
Gets a view of the names of the inputs this converter produces.- Returns:
- The input names.
-