LearningModelPreview Class

Definition

Deprecated. Represents a machine learning model.

public ref class LearningModelPreview sealed
class LearningModelPreview sealed
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract), 65536)]
[Windows.Foundation.Metadata.Static(typeof(Windows.AI.MachineLearning.Preview.ILearningModelPreviewStatics), 65536, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
public sealed class LearningModelPreview
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract), 65536)]
[Windows.Foundation.Metadata.Static(typeof(Windows.AI.MachineLearning.Preview.ILearningModelPreviewStatics), 65536, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
[Windows.Foundation.Metadata.Deprecated("Use LearningModel instead of LearningModelPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
public sealed class LearningModelPreview
Public NotInheritable Class LearningModelPreview
Inheritance
LearningModelPreview
Attributes

Windows 10 requirements

Device family
Windows 10, version 1809 (introduced in 10.0.17763.0)
API contract
Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract (introduced in v2.0)

Examples

public async Task LoadModel()
{
    var modelFile = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFileAsync("model.onnx");
    LearningModelPreview model = await LearningModelPreview.LoadModelFromStorageFileAsync(modelFile);
	
	...
}

Remarks

Warning

This is a deprecated API. Please use the Windows.AI.MachineLearning namespace instead.

Properties

Description

Deprecated. Gets the descriptive metadata for the trained machine learning model.

InferencingOptions

Deprecated. Gets or sets the inferencing options for the evaluation of a model.

Methods

EvaluateAsync(LearningModelBindingPreview, String)

Deprecated. Asynchronously evaluate the machine learning model using the feature value already bound in binding.

EvaluateFeaturesAsync(IDictionary<String,Object>, String)

Deprecated. Asynchronously evaluates names variable instances as the inputs and outputs for the model.

LoadModelFromStorageFileAsync(IStorageFile)

Deprecated. Asynchronously loads a model from file storage.

LoadModelFromStreamAsync(IRandomAccessStreamReference)

Deprecated. Asynchronously loads a model from a provided stream.

Applies to