Windows.ai.machinelearning May 2026

// 3. Load model (cache globally) var model = await App.ModelLoader.GetModelAsync();

var session = new LearningModelSession(model, device); windows.ai.machinelearning

// Run inference var results = await session.EvaluateAsync(binding, "runId"); var session = new LearningModelSession(model

using Microsoft.ML.OnnxRuntime; using Microsoft.AI.MachineLearning; // Load model var file = await StorageFile.GetFileFromApplicationUriAsync( new Uri("ms-appx:///Assets/model.onnx")); var model = await LearningModel.LoadFromStorageFileAsync(file); // Create session var session = new LearningModelSession(model, new LearningModelDevice(LearningModelDeviceKind.Default)); // Create binding var binding = new LearningModelBinding(session); windows.ai.machinelearning