public static async Task <Inceptionv3_convertedModel> CreateFromStreamAsync(IRandomAccessStreamReference stream) { Inceptionv3_convertedModel learningModel = new Inceptionv3_convertedModel(); learningModel.model = await LearningModel.LoadFromStreamAsync(stream); learningModel.session = new LearningModelSession(learningModel.model); learningModel.binding = new LearningModelBinding(learningModel.session); return(learningModel); }
public async Task LoadModel() { var modelFile = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Assets/inceptionv3_converted.onnx")); Model = await Inceptionv3_convertedModel.CreateFromStreamAsync(modelFile); }