Dela via


ModelOperationsCatalog.LoadWithDataLoader Method

Definition

Overloads

LoadWithDataLoader(Stream, IDataLoader<IMultiStreamSource>)

Load a transformer model and a data loader model from a stream.

LoadWithDataLoader(String, IDataLoader<IMultiStreamSource>)

Load a transformer model and a data loader model from a file.

LoadWithDataLoader(Stream, IDataLoader<IMultiStreamSource>)

Load a transformer model and a data loader model from a stream.

public Microsoft.ML.ITransformer LoadWithDataLoader (System.IO.Stream stream, out Microsoft.ML.IDataLoader<Microsoft.ML.Data.IMultiStreamSource> loader);
member this.LoadWithDataLoader : System.IO.Stream * IDataLoader -> Microsoft.ML.ITransformer
Public Function LoadWithDataLoader (stream As Stream, ByRef loader As IDataLoader(Of IMultiStreamSource)) As ITransformer

Parameters

stream
Stream

A readable, seekable stream to load from.

loader
IDataLoader<IMultiStreamSource>

The data loader from the model stream. Note that if there is no data loader, this method will throw an exception. The scenario where no loader is stored in the stream should be handled instead using the Load(Stream, DataViewSchema) method.

Returns

The transformer model from the model stream.

Applies to

LoadWithDataLoader(String, IDataLoader<IMultiStreamSource>)

Load a transformer model and a data loader model from a file.

public Microsoft.ML.ITransformer LoadWithDataLoader (string filePath, out Microsoft.ML.IDataLoader<Microsoft.ML.Data.IMultiStreamSource> loader);
member this.LoadWithDataLoader : string * IDataLoader -> Microsoft.ML.ITransformer
Public Function LoadWithDataLoader (filePath As String, ByRef loader As IDataLoader(Of IMultiStreamSource)) As ITransformer

Parameters

filePath
String

Path to a file where the model should be read from.

loader
IDataLoader<IMultiStreamSource>

The data loader from the model stream. Note that if there is no data loader, this method will throw an exception. The scenario where no loader is stored in the stream should be handled instead using the Load(Stream, DataViewSchema) method.

Returns

The transformer model from the model file.

Applies to