LearningModelPreview.LoadModelFromStorageFileAsync(IStorageFile) LearningModelPreview.LoadModelFromStorageFileAsync(IStorageFile) LearningModelPreview.LoadModelFromStorageFileAsync(IStorageFile) LearningModelPreview.LoadModelFromStorageFileAsync(IStorageFile) LearningModelPreview.LoadModelFromStorageFileAsync(IStorageFile) Method

Definition

Deprecated. Asynchronously loads a model from file storage.

public : static IAsyncOperation<ILearningModelPreview> LoadModelFromStorageFileAsync(IStorageFile modelFile)
static IAsyncOperation<ILearningModelPreview> LoadModelFromStorageFileAsync(IStorageFile modelFile) const;
public static IAsyncOperation<ILearningModelPreview> LoadModelFromStorageFileAsync(IStorageFile modelFile)
Public Shared Function LoadModelFromStorageFileAsync(modelFile As IStorageFile) As IAsyncOperation(Of ILearningModelPreview)
Windows.AI.MachineLearning.Preview.LearningModelPreview.loadModelFromStorageFileAsync(modelFile).done( /* Your success and error handlers */ );
Parameters
modelFile
IStorageFile IStorageFile IStorageFile

The location of the model file.

Returns

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.