public interface ExampleTransformer extends com.oracle.labs.mlrg.olcut.config.Configurable, com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>, Serializable
SparseVector
, extracting the features from it as a OnnxTensor
.
This usually densifies the example, so can be a lot larger than the input example.
N.B. ONNX support is experimental, and may change without a major version bump.
Modifier and Type | Method and Description |
---|---|
ai.onnxruntime.OnnxTensor |
transform(ai.onnxruntime.OrtEnvironment env,
List<SparseVector> vectors)
Converts a list of
SparseVector s representing a batch of features into a OnnxTensor . |
ai.onnxruntime.OnnxTensor |
transform(ai.onnxruntime.OrtEnvironment env,
SparseVector vector)
Converts a
SparseVector representing the features into a OnnxTensor . |
ai.onnxruntime.OnnxTensor transform(ai.onnxruntime.OrtEnvironment env, SparseVector vector) throws ai.onnxruntime.OrtException
SparseVector
representing the features into a OnnxTensor
.
It generates it as a single example minibatch.
env
- The OrtEnvironment to create the tensor in.vector
- The features to convert.ai.onnxruntime.OrtException
- if the transformation failed.ai.onnxruntime.OnnxTensor transform(ai.onnxruntime.OrtEnvironment env, List<SparseVector> vectors) throws ai.onnxruntime.OrtException
SparseVector
s representing a batch of features into a OnnxTensor
.env
- The OrtEnvironment to create the tensor in.vectors
- The batch of features to convert.ai.onnxruntime.OrtException
- if the transformation failed.Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.