Beispiel #1
0
        public static void Train(int trainingCount, double learnRate)
        {
            Console.WriteLine("Starting MNIST training");
            Console.Write("Loading samples... ");
            var mnistSamples = new MnistSamples();
            Console.WriteLine("done");

            Console.Write("Creating network... ");
            var net = new Network(784, new[] { 500, 100 }, 10, learnRate);
            Console.WriteLine("done");

            var training = mnistSamples.Training.Take(trainingCount).ToArray();
            var testing = mnistSamples.Testing.Take(training.Length).ToArray();

            var trainer = new Trainer(net, training, CheckCorrect, testing);
            trainer.TrainUntilDone(true);
        }
Beispiel #2
0
 public static void TrainNot()
 {
     var net = new Network(1, new int[0], 1, 0.5);
     var trainer = new Trainer(net, notCases, CheckCorrect, notCases);
     trainer.TrainUntilDone();
 }