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

Definition

Prerelease. Asynchronously loads a model from file storage.

public : static IAsyncOperation<ILearningModelPreview> LoadModelFromStorageFileAsync(IStorageFile modelFile)
IAsyncOperation<ILearningModelPreview> LoadModelFromStorageFileAsync(IStorageFile modelFile) const;
public static IAsyncOperation<ILearningModelPreview> LoadModelFromStorageFileAsync(IStorageFile modelFile)
Public Static 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);

}