Share via


LearningModelPreview Class

Definition

Deprecated. Represents a machine learning model.

public ref class LearningModelPreview sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract, 65536)]
class LearningModelPreview final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract, 65536)]
/// [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")]
class LearningModelPreview final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract), 65536)]
public sealed class LearningModelPreview
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract), 65536)]
[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
Object Platform::Object IInspectable LearningModelPreview
Attributes

Windows requirements

Device family
Windows 10, version 1803 (introduced in 10.0.17134.0)
API contract
Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract (introduced in v1.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(IMap<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