Share via


LearningModel.LoadFromStreamAsync Method

Definition

Overloads

LoadFromStreamAsync(IRandomAccessStreamReference)

Important

For the latest documentation about Windows Machine Learning, see What is Windows ML. That documentation describes APIs that are in the Microsoft.Windows.AI.MachineLearning namespace, which ships in the Windows App SDK. Those APIs supersede the ones documented here, which are in the Windows.AI.MachineLearning namespace, and were shipped in 2018.

Loads an ONNX model from a stream asynchronously.

LoadFromStreamAsync(IRandomAccessStreamReference, ILearningModelOperatorProvider)

Important

For the latest documentation about Windows Machine Learning, see What is Windows ML. That documentation describes APIs that are in the Microsoft.Windows.AI.MachineLearning namespace, which ships in the Windows App SDK. Those APIs supersede the ones documented here, which are in the Windows.AI.MachineLearning namespace, and were shipped in 2018.

Loads an ONNX model from a stream asynchronously.

LoadFromStreamAsync(IRandomAccessStreamReference)

Important

For the latest documentation about Windows Machine Learning, see What is Windows ML. That documentation describes APIs that are in the Microsoft.Windows.AI.MachineLearning namespace, which ships in the Windows App SDK. Those APIs supersede the ones documented here, which are in the Windows.AI.MachineLearning namespace, and were shipped in 2018.

Loads an ONNX model from a stream asynchronously.

public:
 static IAsyncOperation<LearningModel ^> ^ LoadFromStreamAsync(IRandomAccessStreamReference ^ modelStream);
/// [Windows.Foundation.Metadata.Overload("LoadFromStreamAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<LearningModel> LoadFromStreamAsync(IRandomAccessStreamReference const& modelStream);
[Windows.Foundation.Metadata.Overload("LoadFromStreamAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<LearningModel> LoadFromStreamAsync(IRandomAccessStreamReference modelStream);
function loadFromStreamAsync(modelStream)
Public Shared Function LoadFromStreamAsync (modelStream As IRandomAccessStreamReference) As IAsyncOperation(Of LearningModel)

Parameters

modelStream
IRandomAccessStreamReference

The stream from which to load the model.

Returns

An object representing the model.

Attributes

Remarks

Windows Server

To use this API on Windows Server, you must use Windows Server 2019 with Desktop Experience.

Thread safety

This API is thread-safe.

Applies to

LoadFromStreamAsync(IRandomAccessStreamReference, ILearningModelOperatorProvider)

Important

For the latest documentation about Windows Machine Learning, see What is Windows ML. That documentation describes APIs that are in the Microsoft.Windows.AI.MachineLearning namespace, which ships in the Windows App SDK. Those APIs supersede the ones documented here, which are in the Windows.AI.MachineLearning namespace, and were shipped in 2018.

Loads an ONNX model from a stream asynchronously.

public:
 static IAsyncOperation<LearningModel ^> ^ LoadFromStreamAsync(IRandomAccessStreamReference ^ modelStream, ILearningModelOperatorProvider ^ operatorProvider);
/// [Windows.Foundation.Metadata.Overload("LoadFromStreamWithOperatorProviderAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<LearningModel> LoadFromStreamAsync(IRandomAccessStreamReference const& modelStream, ILearningModelOperatorProvider const& operatorProvider);
[Windows.Foundation.Metadata.Overload("LoadFromStreamWithOperatorProviderAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<LearningModel> LoadFromStreamAsync(IRandomAccessStreamReference modelStream, ILearningModelOperatorProvider operatorProvider);
function loadFromStreamAsync(modelStream, operatorProvider)
Public Shared Function LoadFromStreamAsync (modelStream As IRandomAccessStreamReference, operatorProvider As ILearningModelOperatorProvider) As IAsyncOperation(Of LearningModel)

Parameters

modelStream
IRandomAccessStreamReference

The stream from which to load the model.

Returns

An object representing the model.

Attributes

Remarks

Windows Server

To use this API on Windows Server, you must use Windows Server 2019 with Desktop Experience.

Thread safety

This API is thread-safe.

Applies to