From 44760d0402077d3ccb85349b8832f3da15e17b9a Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Sun, 1 Nov 2015 15:01:43 +0100 Subject: [PATCH] Debugging-setup with a single training sample to check the lack of learning progress --- gui/NeuroUI/netlearner.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gui/NeuroUI/netlearner.cpp b/gui/NeuroUI/netlearner.cpp index 3e7d5f9..1ef8deb 100644 --- a/gui/NeuroUI/netlearner.cpp +++ b/gui/NeuroUI/netlearner.cpp @@ -26,10 +26,10 @@ void NetLearner::run() size_t numIterations = 100000; for (size_t iteration = 0; iteration < numIterations && cancel == false; ++iteration) { - auto trainingSample = mnistLoader.getRandomSample(); + auto trainingSample = mnistLoader.getSample(0); - QImage trainingImage(trainingSample.data, 28, 28, QImage::Format_Grayscale8); - emit sampleImageLoaded(trainingImage); + emit logMessage(QString("training sample ") + QString::number(trainingSample.label)); + emit sampleImageLoaded(trainingSample.toQImage()); std::vector targetValues = {