コード例 #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);
        }
コード例 #2
0
        public static async Task <CNTKGraphModel> CreateCNTKGraphModel(StorageFile file)
        {
            LearningModelPreview learningModel = await LearningModelPreview.LoadModelFromStorageFileAsync(file);

            CNTKGraphModel model = new CNTKGraphModel();

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