예제 #1
0
 //тестирование сети
 public void Test()
 {
     foreach (var kvp in input_layer.TrainSet)
     {
         hidden_layer.Data = kvp.Key;
         hidden_layer.Recognize(null, output_layer);
         output_layer.Recognize(this, null);
         for (var j = 0; j < fact.Length; ++j)
         {
             WriteLine($"{fact[j]}");
         }
         WriteLine();
     }
 }
예제 #2
0
        //тестирование сети
        public Dictionary <double[], double[]> Test()
        {
            var result = new Dictionary <double[], double[]>();

            foreach (var kvp in input_layer.TrainSet)
            {
                hidden_layer.Data = kvp.Key;
                hidden_layer.Recognize(null, output_layer);
                output_layer.Recognize(this, null);
                double[] factResult = (double[])fact.Clone();
                for (var j = 0; j < fact.Length; ++j)
                {
                    WriteLine($"{fact[j]}");
                }
                WriteLine();
                result.Add(kvp.Key, factResult);
            }

            return(result);
        }