Ejemplo n.º 1
0
    public static async Task <Image_RecoModel> CreateImage_RecoModel(StorageFile file)
    {
        LearningModelPreview learningModel = await LearningModelPreview.LoadModelFromStorageFileAsync(file);

        Image_RecoModel model = new Image_RecoModel();

        model.learningModel = learningModel;
        model.binding       = new LearningModelBindingPreview(learningModel);
        model.binding.Bind("classLabel", model.output.classLabel);
        model.binding.Bind("loss", model.output.loss);
        return(model);
    }
Ejemplo n.º 2
0
    public async void InitializeModel()
    {
        StorageFile imageRecoModelFile = await StorageFile.GetFileFromApplicationUriAsync(new Uri($"ms-appx:///Assets/model.onnx"));

        imageRecoModel = await Image_RecoModel.CreateImage_RecoModel(imageRecoModelFile);
    }