OnnxTransformer Class

Definition

ITransformer resulting from fitting an OnnxScoringEstimator. Please refer to OnnxScoringEstimator to learn more about the necessary dependencies, and how to run it on a GPU.

C#
public sealed class OnnxTransformer : Microsoft.ML.Data.RowToRowTransformerBase, IDisposable
C#
public sealed class OnnxTransformer : Microsoft.ML.Data.RowToRowTransformerBase
Inheritance
Implements

Remarks

Estimator Characteristics

Does this estimator need to look at the data to train its parameters? No
Input column data type Known-sized vector of Single or Double types.
Output column data type The same data type as the input column
Required NuGet in addition to Microsoft.ML Microsoft.ML.OnnxTransformer

Supports inferencing of models in ONNX 1.2, 1.3, 1.4, and 1.5 format (opset 7, 8, 9, and 10), using the Microsoft.ML.OnnxRuntime library. Models are scored on CPU by default. If GPU execution is needed (optional), use the NuGet package available at Microsoft.ML.OnnxRuntime.Gpu and download CUDA 9.1 Toolkit and cuDNN. Set parameter 'gpuDeviceId' to a valid non-negative integer. Typical device ID values are 0 or 1. The inputs and outputs of the ONNX models must be Tensor type. Sequence and Maps are not yet supported. OnnxRuntime currently works on Windows and Ubuntu 16.04 Linux 64-bit platforms. Mac OS to be supported soon. Visit ONNX Models to see a list of readily available models to get started with. Refer to ONNX for more information.

To create this estimator use the following: ApplyOnnxModel

Check the See Also section for links to usage examples.

Methods

Explicit Interface Implementations

Extension Methods

Preview(ITransformer, IDataView, Int32)

Preview an effect of the transformer on a given data.

Append<TTrans>(ITransformer, TTrans)

Create a new transformer chain, by appending another transformer to the end of this transformer chain.

CreateTimeSeriesEngine<TSrc,TDst>(ITransformer, IHostEnvironment, PredictionEngineOptions)

TimeSeriesPredictionEngine<TSrc,TDst> creates a prediction engine for a time series pipeline. It updates the state of time series model with observations seen at prediction phase and allows checkpointing the model.

CreateTimeSeriesEngine<TSrc,TDst>(ITransformer, IHostEnvironment, Boolean, SchemaDefinition, SchemaDefinition)

TimeSeriesPredictionEngine<TSrc,TDst> creates a prediction engine for a time series pipeline. It updates the state of time series model with observations seen at prediction phase and allows checkpointing the model.

Applies to

Product Versions
ML.NET 1.2.0, 1.3.1, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 2.0.0, 3.0.0, 4.0.0, Preview