var info = LearningModelDevice.FindAllDevices(); foreach (var d in info) Console.WriteLine(d.AdapterId); | Model Type | Input Shape | Output Shape | |------------|-------------|---------------| | Image classification | [1,3,224,224] | [1,1000] | | Object detection (YOLO) | [1,3,640,640] | [1,84,8400] | | BERT text | [1,128] (ids) + [1,128] (mask) | [1,2] (logits) | 7. Debugging & Performance Enable diagnostics:
// 3. Load model (cache globally) var model = await App.ModelLoader.GetModelAsync(); windows.ai.machinelearning
// 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); var info = LearningModelDevice