public async Task <Results> EvaluateAsync(VideoFrame inputFrame)
        {
            if (model != null)
            {
                // Create bindings for the input and output buffer
                var binding            = new LearningModelBindingPreview(model as LearningModelPreview);
                var outputVariableList = new List <float>();
                binding.Bind(inputImageDescription.Name, inputFrame);
                binding.Bind(outputTensorDescription.Name, outputVariableList);

                // Process the frame through the model
                var results = await model.EvaluateAsync(binding, String.Empty);

                var resultProbabilities = results.Outputs[outputTensorDescription.Name] as List <float>;

                // return the result
                return(new Results()
                {
                    Neutral = resultProbabilities[0],
                    Happiness = resultProbabilities[1],
                    Surprise = resultProbabilities[2],
                    Sadness = resultProbabilities[3],
                    Anger = resultProbabilities[4],
                    Disgust = resultProbabilities[5],
                    Fear = resultProbabilities[6],
                    Contempt = resultProbabilities[7]
                });
            }

            return(null);
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="previewFrame"></param>
        /// <returns></returns>
        private async Task EvaluateVideoFrameAsync(VideoFrame previewFrame)
        {
            if (previewFrame != null)
            {
                try
                {
                    IList <string> classLabel           = new List <string>();
                    LearningModelBindingPreview binding = new LearningModelBindingPreview(model as LearningModelPreview);
                    binding.Bind(inputImageDescription.Name, previewFrame);
                    binding.Bind(outputMapDescription.Name, prob);
                    binding.Bind(outputTensorDescription.Name, classLabel);

                    var stopwatch = Stopwatch.StartNew();
                    LearningModelEvaluationResultPreview results = await model.EvaluateAsync(binding, string.Empty);

                    stopwatch.Stop();

                    await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
                    {
                        fpsTBlock.Text    = $"{1000f / stopwatch.ElapsedMilliseconds,4:f1} fps";
                        statusTBlock.Text = classLabel[0];
                    });
                }
                catch (Exception ex)
                {
                    Debug.WriteLine(ex.Message);
                }
            }
        }
Ejemplo n.º 3
0
        // This method is executed by the ThreadPoolTimer, it performs the evaluation on a copy of the VideoFrame
        private async void EvaluateVideoFrame(ThreadPoolTimer timer)
        {
            // If a lock is being held, or WinML isn't fully initialized, return
            if (!semaphore.Wait(0) || !modelBindingComplete)
            {
                return;
            }

            try
            {
                using (evaluatableVideoFrame)
                {
                    // ************ WinML Evaluate Frame ************ //

                    Debug.WriteLine($"RelativeTime in Seconds: {evaluatableVideoFrame.RelativeTime?.Seconds}");

                    await model.EvaluateAsync(binding, "TinyYOLO");

                    // Remove overlapping and low confidence bounding boxes
                    filteredBoxes = parser.NonMaxSuppress(parser.ParseOutputs(outputArray.ToArray()), 5, .5F);

                    Debug.WriteLine(filteredBoxes.Count <= 0 ? $"No Valid Bounding Boxes" : $"Valid Bounding Boxes: {filteredBoxes.Count}");
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine($"EvaluateFrameException: {ex}");
            }
            finally
            {
                semaphore.Release();
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Evaluate the VideoFrame passed in as arg
        /// </summary>
        /// <param name="inputFrame"></param>
        /// <returns></returns>
        private async Task EvaluateVideoFrameAsync(VideoFrame inputFrame)
        {
            if (inputFrame != null)
            {
                try
                {
                    // Create bindings for the input and output buffer
                    LearningModelBindingPreview binding = new LearningModelBindingPreview(_model as LearningModelPreview);
                    binding.Bind(_inputImageDescription.Name, inputFrame);
                    binding.Bind(_outputTensorDescription.Name, _outputVariableList);

                    // Process the frame with the model, and time the operation
                    modeltime_w.Restart();
                    LearningModelEvaluationResultPreview results = await _model.EvaluateAsync(binding, "test");

                    modeltime_w.Stop();

                    List <float> resultProbabilities = results.Outputs[_outputTensorDescription.Name] as List <float>;

                    // Find the result of the evaluation in the bound output (the top classes detected with the max confidence)
                    List <float> topProbabilities = new List <float>()
                    {
                        0.0f, 0.0f, 0.0f
                    };
                    List <int> topProbabilityLabelIndexes = new List <int>()
                    {
                        0, 0, 0
                    };
                    for (int i = 0; i < resultProbabilities.Count(); i++)
                    {
                        for (int j = 0; j < 3; j++)
                        {
                            if (resultProbabilities[i] > topProbabilities[j])
                            {
                                topProbabilityLabelIndexes[j] = i;
                                topProbabilities[j]           = resultProbabilities[i];
                                break;
                            }
                        }
                    }

                    // Display the result
                    var runtimemS = modeltime_w.ElapsedMilliseconds;

                    string message = $"Runtime {runtimemS}mS Predominant objects detected are:";
                    for (int i = 0; i < 3; i++)
                    {
                        message += $"\n\"{ _labels[topProbabilityLabelIndexes[i]]}\" with confidence of { topProbabilities[i]}";
                    }
                    StatusBlock.Text = message;
                }
                catch (Exception ex)
                {
                    StatusBlock.Text = $"error: {ex.Message}";
                }

                ButtonRun.IsEnabled = true;
            }
        }
Ejemplo n.º 5
0
    public async Task <Image_RecoModelOutput> EvaluateAsync(Image_RecoModelInput input)
    {
        var d = input.data.Direct3DSurface.Description;

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

        return(output);
    }
Ejemplo n.º 6
0
        private async Task EvaluateVideoFrameWithYoloAsync(VideoFrame inputFrame)
        {
            if (inputFrame != null)
            {
                try
                {
                    // Create bindings for the input and output buffer
                    var binding = new LearningModelBindingPreview(model);

                    // R4 WinML does needs the output pre-allocated for multi-dimensional tensors
                    var outputArray = new List <float>();
                    outputArray.AddRange(new float[21125]);  // Total size of TinyYOLO output

                    binding.Bind(inputImageDescription.Name, inputFrame);
                    binding.Bind(outputTensorDescription.Name, outputArray);

                    // Process the frame with the model
                    var stopwatch = Stopwatch.StartNew();

                    //var results = await model.EvaluateAsync(binding, "TinyYOLO");

                    var results = await model.EvaluateAsync(binding, "TinyYOLOv2");

                    stopwatch.Stop();

                    var resultProbabilities = results.Outputs[outputTensorDescription.Name] as List <float>;

                    // Use out helper to parse to the YOLO outputs into bounding boxes with labels
                    boxes = parser.ParseOutputs(resultProbabilities.ToArray(), .3F);

                    await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
                    {
                        Duration.Text    = $"{1000f / stopwatch.ElapsedMilliseconds,4:f1} fps";
                        StatusBlock.Text = "TinyYoloModel Evaluation Completed";
                    });
                }
                catch (Exception ex)
                {
                    await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => StatusBlock.Text = $"EvaluateVideoFrameWithYoloAsync Error: {ex.Message}");
                }

                await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => EvaluateImageButton.IsEnabled = true);
            }
        }
Ejemplo n.º 7
0
        public async Task <CNTKGraphModelOutput> EvaluateAsync(CNTKGraphModelInput input)
        {
            CNTKGraphModelOutput        output  = new CNTKGraphModelOutput();
            LearningModelBindingPreview binding = new LearningModelBindingPreview(learningModel);

            binding.Bind("Input3", input.Input3);
            binding.Bind("Softmax99_Output_0", output.Softmax99_Output_0);
            LearningModelEvaluationResultPreview evalResult = await learningModel.EvaluateAsync(binding, string.Empty);

            return(output);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Evaluate the VideoFrame passed in as arg
        /// </summary>
        /// <param name="inputFrame"></param>
        /// <returns></returns>
        private async Task EvaluateVideoFrameAsync(VideoFrame inputFrame)
        {
            if (inputFrame != null)
            {
                try
                {
                    // Create bindings for the input and output buffer
                    LearningModelBindingPreview binding = new LearningModelBindingPreview(_model as LearningModelPreview);
                    binding.Bind(_inputImageDescription.Name, inputFrame);
                    binding.Bind(_outputTensorDescription.Name, _outputVariableList);

                    // Process the frame with the model
                    LearningModelEvaluationResultPreview results = await _model.EvaluateAsync(binding, "test");

                    List <float> resultProbabilities = results.Outputs[_outputTensorDescription.Name] as List <float>;

                    // Find the result of the evaluation in the bound output (the top classes detected with the max confidence)
                    List <float> topProbabilities = new List <float>()
                    {
                        0.0f, 0.0f, 0.0f
                    };
                    List <int> topProbabilityLabelIndexes = new List <int>()
                    {
                        0, 0, 0
                    };
                    for (int i = 0; i < resultProbabilities.Count(); i++)
                    {
                        for (int j = 0; j < 3; j++)
                        {
                            if (resultProbabilities[i] > topProbabilities[j])
                            {
                                topProbabilityLabelIndexes[j] = i;
                                topProbabilities[j]           = resultProbabilities[i];
                                break;
                            }
                        }
                    }

                    // Display the result
                    string message = "Predominant objects detected are:";
                    for (int i = 0; i < 3; i++)
                    {
                        message += $"\n{ _labels[topProbabilityLabelIndexes[i]]} with confidence of { topProbabilities[i]}";
                    }
                    await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => StatusBlock.Text = message);
                }
                catch (Exception ex)
                {
                    await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => StatusBlock.Text = $"error: {ex.Message}");
                }

                await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => ButtonRun.IsEnabled = true);
            }
        }
Ejemplo n.º 9
0
        public async Task <TinyYOLOModelModelOutput> EvaluateAsync(TinyYOLOModelModelInput input)
        {
            TinyYOLOModelModelOutput    output  = new TinyYOLOModelModelOutput();
            LearningModelBindingPreview binding = new LearningModelBindingPreview(learningModel);

            binding.Bind("image", input.image);
            binding.Bind("grid", output.grid);
            LearningModelEvaluationResultPreview evalResult = await learningModel.EvaluateAsync(binding, string.Empty);

            return(output);
        }
Ejemplo n.º 10
0
        public async Task <Vgg19ModelOutput> EvaluateAsync(Vgg19ModelInput input)
        {
            Vgg19ModelOutput            output  = new Vgg19ModelOutput();
            LearningModelBindingPreview binding = new LearningModelBindingPreview(learningModel);

            binding.Bind("data_0", input.data_0);
            binding.Bind("prob_1", output.prob_1);
            LearningModelEvaluationResultPreview evalResult = await learningModel.EvaluateAsync(binding, string.Empty);

            return(output);
        }
Ejemplo n.º 11
0
        public async Task <MNISTModelOutput> EvaluateAsync(MNISTModelInput input)
        {
            MNISTModelOutput            output  = new MNISTModelOutput();
            LearningModelBindingPreview binding = new LearningModelBindingPreview(learningModel);

            binding.Bind("Input3", input.Input3);
            binding.Bind("Plus214_Output_0", output.Plus214_Output_0);
            LearningModelEvaluationResultPreview evalResult = await learningModel.EvaluateAsync(binding, string.Empty);

            return(output);
        }
Ejemplo n.º 12
0
        public async Task <Squeezenet_oldModelOutput> EvaluateAsync(Squeezenet_oldModelInput input)
        {
            Squeezenet_oldModelOutput   output  = new Squeezenet_oldModelOutput();
            LearningModelBindingPreview binding = new LearningModelBindingPreview(learningModel);

            binding.Bind("data_0", input.data_0);
            binding.Bind("softmaxout_1", output.softmaxout_1);
            LearningModelEvaluationResultPreview evalResult = await learningModel.EvaluateAsync(binding, string.Empty);

            return(output);
        }
Ejemplo n.º 13
0
        public async Task <MpsnnGraphModelOutput> EvaluateAsync(MpsnnGraphModelInput input)
        {
            MpsnnGraphModelOutput       output  = new MpsnnGraphModelOutput();
            LearningModelBindingPreview binding = new LearningModelBindingPreview(_learningModel);

            binding.Bind("image", input.Image);
            binding.Bind("grid", output.Grid);
            LearningModelEvaluationResultPreview evalResult = await _learningModel.EvaluateAsync(binding, string.Empty);

            return(output);
        }
Ejemplo n.º 14
0
        public async Task <TinyYoloV2ModelOutput> EvaluateAsync(TinyYoloV2ModelInput input)
        {
            var output  = new TinyYoloV2ModelOutput();
            var binding = new LearningModelBindingPreview(_learningModel);

            binding.Bind("image", input.Image);
            binding.Bind("grid", output.Grid);
            var evalResult = await _learningModel.EvaluateAsync(binding, string.Empty);

            return(output);
        }
Ejemplo n.º 15
0
        public async Task <YOLO2ModelOutput> EvaluateAsync(YOLO2ModelInput input)
        {
            YOLO2ModelOutput            output  = new YOLO2ModelOutput();
            LearningModelBindingPreview binding = new LearningModelBindingPreview(learningModel);

            binding.Bind("input__0", input.input__0);
            binding.Bind("output__0", output.output__0);
            LearningModelEvaluationResultPreview evalResult = await learningModel.EvaluateAsync(binding, string.Empty);

            return(output);
        }
        public async Task <_x0036_fba5602_x002D_2416_x002D_4582_x002D_8f3b_x002D_931bc0eadc24_c97c9b55_x002D_21f5_x002D_48b8_x002D_9a25_x002D_83f235a0d8d7ModelOutput> EvaluateAsync(_x0036_fba5602_x002D_2416_x002D_4582_x002D_8f3b_x002D_931bc0eadc24_c97c9b55_x002D_21f5_x002D_48b8_x002D_9a25_x002D_83f235a0d8d7ModelInput input)
        {
            _x0036_fba5602_x002D_2416_x002D_4582_x002D_8f3b_x002D_931bc0eadc24_c97c9b55_x002D_21f5_x002D_48b8_x002D_9a25_x002D_83f235a0d8d7ModelOutput output = new _x0036_fba5602_x002D_2416_x002D_4582_x002D_8f3b_x002D_931bc0eadc24_c97c9b55_x002D_21f5_x002D_48b8_x002D_9a25_x002D_83f235a0d8d7ModelOutput();
            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);
        }
Ejemplo n.º 17
0
        public async Task <_x0034_7c46b62_x002D_55d4_x002D_418f_x002D_9667_x002D_bca58c105516_df5a0f61_x002D_d714_x002D_4789_x002D_8077_x002D_27f227995765ModelOutput> EvaluateAsync(_x0034_7c46b62_x002D_55d4_x002D_418f_x002D_9667_x002D_bca58c105516_df5a0f61_x002D_d714_x002D_4789_x002D_8077_x002D_27f227995765ModelInput input)
        {
            _x0034_7c46b62_x002D_55d4_x002D_418f_x002D_9667_x002D_bca58c105516_df5a0f61_x002D_d714_x002D_4789_x002D_8077_x002D_27f227995765ModelOutput output = new _x0034_7c46b62_x002D_55d4_x002D_418f_x002D_9667_x002D_bca58c105516_df5a0f61_x002D_d714_x002D_4789_x002D_8077_x002D_27f227995765ModelOutput();
            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);
        }
Ejemplo n.º 18
0
        public async Task <Af4dec16_x002D_0900_x002D_4f35_x002D_8d03_x002D_28743433843e_cb36632a_x002D_770d_x002D_4ef8_x002D_a996_x002D_d3b067ff0e11ModelOutput> EvaluateAsync(Af4dec16_x002D_0900_x002D_4f35_x002D_8d03_x002D_28743433843e_cb36632a_x002D_770d_x002D_4ef8_x002D_a996_x002D_d3b067ff0e11ModelInput input)
        {
            Af4dec16_x002D_0900_x002D_4f35_x002D_8d03_x002D_28743433843e_cb36632a_x002D_770d_x002D_4ef8_x002D_a996_x002D_d3b067ff0e11ModelOutput output = new Af4dec16_x002D_0900_x002D_4f35_x002D_8d03_x002D_28743433843e_cb36632a_x002D_770d_x002D_4ef8_x002D_a996_x002D_d3b067ff0e11ModelOutput();
            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);
        }
Ejemplo n.º 19
0
        public async Task <C2302845_x002D_023d_x002D_4c61_x002D_9b48_x002D_25d860a0c350_c6ad3001_x002D_dc81_x002D_45fd_x002D_a943_x002D_e7afa90c07f5ModelOutput> EvaluateAsync(C2302845_x002D_023d_x002D_4c61_x002D_9b48_x002D_25d860a0c350_c6ad3001_x002D_dc81_x002D_45fd_x002D_a943_x002D_e7afa90c07f5ModelInput input)
        {
            C2302845_x002D_023d_x002D_4c61_x002D_9b48_x002D_25d860a0c350_c6ad3001_x002D_dc81_x002D_45fd_x002D_a943_x002D_e7afa90c07f5ModelOutput output = new C2302845_x002D_023d_x002D_4c61_x002D_9b48_x002D_25d860a0c350_c6ad3001_x002D_dc81_x002D_45fd_x002D_a943_x002D_e7afa90c07f5ModelOutput();
            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);
        }
Ejemplo n.º 20
0
        public async Task <MemeClassifierModelOutput> EvaluateAsync(MemeClassifierModelInput input)
        {
            MemeClassifierModelOutput   output  = new MemeClassifierModelOutput();
            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);
        }
        public async Task <MobilenetModelOutput> EvaluateAsync(MobilenetModelInput input)
        {
            MobilenetModelOutput        output  = new MobilenetModelOutput();
            LearningModelBindingPreview binding = new LearningModelBindingPreview(learningModel);

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

            return(output);
        }
Ejemplo n.º 22
0
        public async Task <GoogLeNetPlacesModelModelOutput> EvaluateAsync(GoogLeNetPlacesModelModelInput input)
        {
            GoogLeNetPlacesModelModelOutput output  = new GoogLeNetPlacesModelModelOutput();
            LearningModelBindingPreview     binding = new LearningModelBindingPreview(learningModel);

            binding.Bind("sceneImage", input.sceneImage);
            binding.Bind("sceneLabel", output.sceneLabel);
            binding.Bind("sceneLabelProbs", output.sceneLabelProbs);
            LearningModelEvaluationResultPreview evalResult = await learningModel.EvaluateAsync(binding, string.Empty);

            return(output);
        }
Ejemplo n.º 23
0
        public async Task <ModelOutput> EvaluateAsync(VideoFrame videoFrame)
        {
            ModelOutput output = new ModelOutput(_labels);
            LearningModelBindingPreview binding = new LearningModelBindingPreview(_learningModel);

            binding.Bind("data", videoFrame);
            binding.Bind("classLabel", output.ClassLabel);
            binding.Bind("loss", output.Loss);
            LearningModelEvaluationResultPreview evalResult = await _learningModel.EvaluateAsync(binding, string.Empty);

            return(output);
        }
Ejemplo n.º 24
0
        public async Task <_x0035_3979b10_x002D_4cb6_x002D_417f_x002D_9f57_x002D_a85d70709fbc_44105f29_x002D_1f46_x002D_48b2_x002D_b0ad_x002D_7d42d639cb20ModelOutput> EvaluateAsync(_x0035_3979b10_x002D_4cb6_x002D_417f_x002D_9f57_x002D_a85d70709fbc_44105f29_x002D_1f46_x002D_48b2_x002D_b0ad_x002D_7d42d639cb20ModelInput input)
        {
            _x0035_3979b10_x002D_4cb6_x002D_417f_x002D_9f57_x002D_a85d70709fbc_44105f29_x002D_1f46_x002D_48b2_x002D_b0ad_x002D_7d42d639cb20ModelOutput output = new _x0035_3979b10_x002D_4cb6_x002D_417f_x002D_9f57_x002D_a85d70709fbc_44105f29_x002D_1f46_x002D_48b2_x002D_b0ad_x002D_7d42d639cb20ModelOutput();
            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);
        }
Ejemplo n.º 25
0
        public async Task <_x0039_3deb65e_x002D_dfa1_x002D_49a3_x002D_8a7c_x002D_b802a3a909e1_28f9b6ec_x002D_eae5_x002D_49e6_x002D_8da7_x002D_2b70beb4c498ModelOutput> EvaluateAsync(_x0039_3deb65e_x002D_dfa1_x002D_49a3_x002D_8a7c_x002D_b802a3a909e1_28f9b6ec_x002D_eae5_x002D_49e6_x002D_8da7_x002D_2b70beb4c498ModelInput input)
        {
            _x0039_3deb65e_x002D_dfa1_x002D_49a3_x002D_8a7c_x002D_b802a3a909e1_28f9b6ec_x002D_eae5_x002D_49e6_x002D_8da7_x002D_2b70beb4c498ModelOutput output = new _x0039_3deb65e_x002D_dfa1_x002D_49a3_x002D_8a7c_x002D_b802a3a909e1_28f9b6ec_x002D_eae5_x002D_49e6_x002D_8da7_x002D_2b70beb4c498ModelOutput();
            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);
        }
Ejemplo n.º 26
0
        public async Task <Ee7165d4_x002D_31e3_x002D_468e_x002D_ba0c_x002D_565f0b33d377_1bc49a81_x002D_827d_x002D_48b3_x002D_84bf_x002D_3a9555b4c54eModelOutput> EvaluateAsync(Ee7165d4_x002D_31e3_x002D_468e_x002D_ba0c_x002D_565f0b33d377_1bc49a81_x002D_827d_x002D_48b3_x002D_84bf_x002D_3a9555b4c54eModelInput input)
        {
            Ee7165d4_x002D_31e3_x002D_468e_x002D_ba0c_x002D_565f0b33d377_1bc49a81_x002D_827d_x002D_48b3_x002D_84bf_x002D_3a9555b4c54eModelOutput output = new Ee7165d4_x002D_31e3_x002D_468e_x002D_ba0c_x002D_565f0b33d377_1bc49a81_x002D_827d_x002D_48b3_x002D_84bf_x002D_3a9555b4c54eModelOutput();
            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);
        }
Ejemplo n.º 27
0
        public async Task <ViscoreitanoModelOutput> EvaluateAsync(ViscoreitanoModelInput input)
        {
            ViscoreitanoModelOutput     output  = new ViscoreitanoModelOutput();
            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);
        }
Ejemplo n.º 28
0
        public async Task <_x0035_f11ca47_x002D_2841_x002D_4ece_x002D_af83_x002D_e7bc2b5e8603_fe5629e0_x002D_49e2_x002D_4e9c_x002D_be74_x002D_076aa419dcddModelOutput> EvaluateAsync(_x0035_f11ca47_x002D_2841_x002D_4ece_x002D_af83_x002D_e7bc2b5e8603_fe5629e0_x002D_49e2_x002D_4e9c_x002D_be74_x002D_076aa419dcddModelInput input)
        {
            _x0035_f11ca47_x002D_2841_x002D_4ece_x002D_af83_x002D_e7bc2b5e8603_fe5629e0_x002D_49e2_x002D_4e9c_x002D_be74_x002D_076aa419dcddModelOutput output = new _x0035_f11ca47_x002D_2841_x002D_4ece_x002D_af83_x002D_e7bc2b5e8603_fe5629e0_x002D_49e2_x002D_4e9c_x002D_be74_x002D_076aa419dcddModelOutput();
            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);
        }
Ejemplo n.º 29
0
        public async Task <InkShapesModelOutput> EvaluateAsync(InkShapesModelInput input)
        {
            InkShapesModelOutput        output  = new InkShapesModelOutput(_lossCount);
            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);
        }
Ejemplo n.º 30
0
        public async Task <E6c82f6e_x002D_c60f_x002D_422a_x002D_97b6_x002D_e0406cba82da_6ed0259c_x002D_001e_x002D_4895_x002D_be7a_x002D_4a930321a307ModelOutput> EvaluateAsync(E6c82f6e_x002D_c60f_x002D_422a_x002D_97b6_x002D_e0406cba82da_6ed0259c_x002D_001e_x002D_4895_x002D_be7a_x002D_4a930321a307ModelInput input)
        {
            E6c82f6e_x002D_c60f_x002D_422a_x002D_97b6_x002D_e0406cba82da_6ed0259c_x002D_001e_x002D_4895_x002D_be7a_x002D_4a930321a307ModelOutput output = new E6c82f6e_x002D_c60f_x002D_422a_x002D_97b6_x002D_e0406cba82da_6ed0259c_x002D_001e_x002D_4895_x002D_be7a_x002D_4a930321a307ModelOutput();
            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);
        }