LearningModelPreview LearningModelPreview LearningModelPreview LearningModelPreview LearningModelPreview Class

Definition

Represents a machine learning model.

public : sealed class LearningModelPreview : ILearningModelPreview
struct winrt::Windows::AI::MachineLearning::Preview::LearningModelPreview : ILearningModelPreview
public sealed class LearningModelPreview : ILearningModelPreview
Public NotInheritable Class LearningModelPreview Implements ILearningModelPreview
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10, version 1803 (introduced v10.0.17134.0)
API contract
Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract (introduced v1)

Examples

public async Task LoadModel()
{

    var modelFile = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFileAsync("model.onnx");

    LearningModelPreview model = await LearningModelPreview.LoadModelFromStorageFileAsync(modelFile);



    ...

}

Remarks

Note

Windows.AI.MachineLearning.Preview is a preview API and may be substantially modified before it’s officially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Properties

Description Description Description Description Description

Gets the descriptive metadata for the trained machine learning model.

InferencingOptions InferencingOptions InferencingOptions InferencingOptions InferencingOptions

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

Methods

EvaluateFeaturesAsync(IMap<String, Object>, String) EvaluateFeaturesAsync(IMap<String, Object>, String) EvaluateFeaturesAsync(IMap<String, Object>, String) EvaluateFeaturesAsync(IMap<String, Object>, String) EvaluateFeaturesAsync(IMap<String, Object>, String)

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

LoadModelFromStorageFileAsync(IStorageFile) LoadModelFromStorageFileAsync(IStorageFile) LoadModelFromStorageFileAsync(IStorageFile) LoadModelFromStorageFileAsync(IStorageFile) LoadModelFromStorageFileAsync(IStorageFile)

Asynchronously loads a model from file storage.

LoadModelFromStreamAsync(IRandomAccessStreamReference) LoadModelFromStreamAsync(IRandomAccessStreamReference) LoadModelFromStreamAsync(IRandomAccessStreamReference) LoadModelFromStreamAsync(IRandomAccessStreamReference) LoadModelFromStreamAsync(IRandomAccessStreamReference)

Asynchronously loads a model from a provided stream.