Ejemplo n.º 1
0
        private async void InitializeModel()
        {
            string      modelPath = @"ms-appx:///Assets/FER-Emotion-Recognition.onnx";
            StorageFile modelFile = await StorageFile.GetFileFromApplicationUriAsync(new Uri(modelPath));

            model = await CNTKGraphModel.CreateCNTKGraphModel(modelFile);
        }
        public static async Task <CNTKGraphModel> CreateCNTKGraphModel(StorageFile file)
        {
            LearningModelPreview learningModel = await LearningModelPreview.LoadModelFromStorageFileAsync(file);

            CNTKGraphModel model = new CNTKGraphModel();

            model.learningModel = learningModel;
            return(model);
        }