コード例 #1
0
        public static async Task <SingelObjectApeModelV8Model> CreateFromStreamAsync(IRandomAccessStreamReference stream)
        {
            SingelObjectApeModelV8Model learningModel = new SingelObjectApeModelV8Model();

            learningModel.model = await LearningModel.LoadFromStreamAsync(stream);

            learningModel.session = new LearningModelSession(learningModel.model);
            learningModel.binding = new LearningModelBinding(learningModel.session);
            return(learningModel);
        }
コード例 #2
0
        private async void LoadModel(string modelPath)
        {
            var onnxFile = await StorageFile.GetFileFromApplicationUriAsync(new Uri(modelPath));

            model = await SingelObjectApeModelV8Model.CreateFromStreamAsync(onnxFile).ConfigureAwait(true);
        }