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.

public sealed class OnnxTransformer : Microsoft.ML.Data.RowToRowTransformerBase, IDisposable
public sealed class OnnxTransformer : Microsoft.ML.Data.RowToRowTransformerBase
type OnnxTransformer = class
    inherit RowToRowTransformerBase
    interface IDisposable
type OnnxTransformer = class
    inherit RowToRowTransformerBase
Public NotInheritable Class OnnxTransformer
Inherits RowToRowTransformerBase
Implements IDisposable
Public NotInheritable Class OnnxTransformer
Inherits 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

Dispose()
GetOutputSchema(DataViewSchema) (Inherited from RowToRowTransformerBase)
Transform(IDataView) (Inherited from RowToRowTransformerBase)

Explicit Interface Implementations

ICanSaveModel.Save(ModelSaveContext) (Inherited from RowToRowTransformerBase)
ITransformer.GetRowToRowMapper(DataViewSchema) (Inherited from RowToRowTransformerBase)
ITransformer.IsRowToRowMapper (Inherited from RowToRowTransformerBase)

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, 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