From 6ece7109cc7675374cfd482e51edb6d120ef0735 Mon Sep 17 00:00:00 2001 From: Frank Seide Date: Thu, 18 Feb 2016 09:00:01 -0800 Subject: [PATCH] (logging) --- Source/SGDLib/SGD.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Source/SGDLib/SGD.cpp b/Source/SGDLib/SGD.cpp index 99a517c0527b..0324861377e4 100644 --- a/Source/SGDLib/SGD.cpp +++ b/Source/SGDLib/SGD.cpp @@ -629,7 +629,9 @@ void SGD::TrainOrAdaptModel(int startEpoch, ComputationNetworkPtr net, if ((g_mpi == nullptr) || g_mpi->IsMainNode()) { SaveCheckPointInfo(i, totalSamplesSeen, learnRatePerSample, smoothedGradients, prevCriterion, chosenMinibatchSize); - net->Save(GetModelNameForEpoch(i)); + auto modelName = GetModelNameForEpoch(i); + fprintf(stderr, "SGD: Saving checkpoint model '%ls'\n", modelName.c_str()); + net->Save(modelName); if (!m_keepCheckPointFiles) { // delete previous checkpoint file to save space @@ -1069,7 +1071,11 @@ size_t SGD::TrainOneEpoch(ComputationNetworkPtr net, totalTimeInMBs += timer.ElapsedSeconds(); numSamplesLastMBs += useModelAveraging ? int(actualMBSize) : int(aggregateNumSamplesWithLabel); - if (numMBsRun % m_numMBsToShowResult == 0) + if ( +#if 0 // output the first few to see if everything started right + numMBsRun <= 3 || +#endif + numMBsRun % m_numMBsToShowResult == 0) { // get the epoch Values updated if (!useGradientAggregation)