Beispiel #1
0
        protected void DoEpoch(IEnumerable <DataSetItem> trainItems)
        {
            int correct = 0;
            int total   = 0;

            foreach (DataSetItem item in trainItems)
            {
                TrainingResults result = Network.Train(item);
                if (result.Correct)
                {
                    correct++;
                }
                total++;

                if (Snapshot.UpdateRequested)
                {
                    Snapshot.UpdateSnapshot();
                }
                if (total % 10 == 0)
                {
                    UpdateStatus(correct, total);
                }
            }
            Console.WriteLine();
        }