Windows.ai.machinelearning

Carga tu archivo bc3, introduce tu correo electrónico y recibirás un email.

Preguntas frecuentes

var session = new LearningModelSession(model, device);

// Get output var outputTensor = results.Outputs["output"] as TensorFloat; var outputArray = outputTensor.GetAsVectorView(); public async Task<string> ClassifyImage(SoftwareBitmap bitmap)

// 4. Bind & evaluate var session = new LearningModelSession(model); var binding = new LearningModelBinding(session); binding.Bind("data", tensor);

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

// Force GPU var device = new LearningModelDevice(LearningModelDeviceKind.DirectXHighPerformance); // Force NPU (Windows 11 24H2+) var device = new LearningModelDevice(LearningModelDeviceKind.Npu);

mldata.exe model.onnx /namespace MyApp.ML /output ModelCode.cs

// 1. Preprocess: resize to model input size (224x224) var resized = await ImageHelper.ResizeBitmap(bitmap, 224, 224); // 2. Convert to float tensor (channel-first, normalized) var tensor = ImageHelper.BitmapToTensor(resized);