コード例 #1
0
        public static long BenchmarkEncogFlat(double[][] input, double[][] output)
        {
            var network = new FlatNetwork(input[0].Length, HIDDEN_COUNT, 0,
                                          output[0].Length, false);
            network.Randomize();
            var trainingSet = new BasicMLDataSet(input, output);

            var train = new TrainFlatNetworkBackPropagation(
                network, trainingSet, 0.7, 0.7);

            var a = new double[2];
            var b = new double[1];

            var sw = new Stopwatch();
            sw.Start();
            // run epoch of learning procedure
            for (int i = 0; i < ITERATIONS; i++)
            {
                train.Iteration();
            }
            sw.Stop();

            return sw.ElapsedMilliseconds;
        }