private async void LoadModel() { //Load a machine learning model StorageFile modelFile = await StorageFile.GetFileFromApplicationUriAsync(new Uri($"ms-appx:///Assets/MNIST.onnx")); ModelGen = await MNISTModel.CreateMNISTModel(modelFile); }
public static async Task <MNISTModel> CreateMNISTModel(StorageFile file) { LearningModelPreview learningModel = await LearningModelPreview.LoadModelFromStorageFileAsync(file); MNISTModel model = new MNISTModel(); model.learningModel = learningModel; return(model); }
private async void LoadModel() { /* caricare il modello di apprendimento automatico a partire dal file aggiunto nella * cartella Assets del progetto tramite le API di StorageFile e quindi agganciarlo * alla classe corrispondente al modello stesso creato da Visual Studio */ StorageFile modelFile = await StorageFile.GetFileFromApplicationUriAsync(new Uri($"ms-appx:///Assets/MNIST.onnx")); ModelGen = await MNISTModel.CreateMNISTModel(modelFile); }