Exemple #1
0
        protected override void Train()
        {
            var tcnt   = m_Training.Count;
            var tstart = DateTime.Now;
            var now    = DateTime.Now;

            Alg = Examples.CreateCIFAR10Demo2(m_Training);
            Alg.EpochEndedEvent += (o, e) =>
            {
                Utils.HandleEpochEnded(Alg, m_Test, ResultsFolder);
                tstart = DateTime.Now;
            };
            //Alg.BatchEndedEvent += (o, e) =>
            //                       {
            //                         now = DateTime.Now;
            //                         var iter = Alg.Iteration;
            //                         var pct = 100*iter/(float)tcnt;
            //                         var elapsed = TimeSpan.FromMinutes((now-tstart).TotalMinutes * (tcnt-iter)/iter);
            //                         Console.Write("\rCurrent epoch progress: {0:0.00}%. Left {1:0}m {2:0}s         ", pct, elapsed.Minutes, elapsed.Seconds);
            //                       };

            Console.WriteLine();
            Console.WriteLine("Training started at {0}", now);
            Alg.Train();

            Console.WriteLine("--------- ELAPSED TRAIN ----------" + (DateTime.Now - now).TotalMilliseconds);
        }
Exemple #2
0
 protected override BackpropAlgorithm CreateAlgorithm()
 {
     return(Examples.CreateCIFAR10Demo2());
 }