Esempio n. 1
0
        private void runEpoch(MultiRegressionSample <double[][, ]> sample)
        {
            // loop on batches
            foreach (var batch in sample.Batch(m_BatchSize))
            {
                runBatch(batch);
            }

            // update epoch stats
            m_Epoch++;
            m_Iteration    = 0;
            m_Batch        = 0;
            m_LearningRate = m_LearningRateScheduler.GetRate(m_Epoch);

            if (EpochEndedEvent != null)
            {
                EpochEndedEvent(this, EventArgs.Empty);
            }
        }
Esempio n. 2
0
        private void runEpoch()
        {
            // loop on batches
            //int b = 0;
            foreach (var batch in TrainingSample.Batch(m_BatchSize))
            {
                runBatch(batch);
                //if ((++b) % 10000 == 0) Console.WriteLine("Batch: {0} ({1} iters)", b, b*BatchSize);
            }

            // update epoch stats
            m_Epoch++;
            m_Iteration    = 0;
            m_Batch        = 0;
            m_LearningRate = m_LearningRateScheduler.GetRate(m_Epoch);

            if (EpochEndedEvent != null)
            {
                EpochEndedEvent(this, EventArgs.Empty);
            }
        }