The Windows AI Platform enables developers to use pre-trained machine learning models in applications across the Windows device family. Machine learning evaluation on the edge offers developers a number of benefits, including low latency real-time results, reduced operational costs, and flexibility. Together with Microsoft's Cloud AI platform, developers can build affordable, end-to-end AI solutions that combine training models in Azure with deployment to Windows devices for evaluation. In this session you will learn about the capabilities of the Windows AI Platform and how it can power ML based solutions in your application.
16. public sealed class MNISTModelInput {
public VideoFrame Input3 { get; set; }}
public sealed class MNISTModelOutput {
public IList<float> Plus214_Output_0 { get; set; }
public MNISTModelOutput(){
this.Plus214_Output_0 = new List<float>();}}
17. public sealed class MNISTModel {
private LearningModelPreview learningModel;
public static async Task<MNISTModel> CreateMNISTModel(StorageFile file) {
LearningModelPreview learningModel = await
LearningModelPreview.LoadModelFromStorageFileAsync(file);
MNISTModel model = new MNISTModel();
model.learningModel = learningModel;
return model;}
18. public async Task<MNISTModelOutput> EvaluateAsync(MNISTModelInput input) {
MNISTModelOutput output = new MNISTModelOutput();
LearningModelBindingPreview binding = new
LearningModelBindingPreview(learningModel);
binding.Bind("Input3", input.Input3);
binding.Bind("Plus214_Output_0", output.Plus214_Output_0);
LearningModelEvaluationResultPreview evalResult = await
learningModel.EvaluateAsync(binding, string.Empty);
return output;}}