Exemplo n.º 1
0
        public async Task <CatOrDogModelOutput> EvaluateAsync(CatOrDogModelInput input)
        {
            CatOrDogModelOutput         output  = new CatOrDogModelOutput();
            LearningModelBindingPreview binding = new LearningModelBindingPreview(learningModel);

            binding.Bind("data", input.data);
            binding.Bind("classLabel", output.classLabel);
            binding.Bind("loss", output.loss);
            LearningModelEvaluationResultPreview evalResult = await learningModel.EvaluateAsync(binding, string.Empty);

            return(output);
        }
Exemplo n.º 2
0
 private void ShowPredictionResult(CatOrDogModelOutput output)
 {
     TextBlock.Text = "Image contains: " + output.classLabel[0];
 }