Back to learning all samples
This commit is contained in:
parent
5e32724b1a
commit
0f7c617f9c
1 changed files with 3 additions and 8 deletions
|
@ -26,9 +26,9 @@ void NetLearner::run()
|
|||
size_t numIterations = 100000;
|
||||
for (size_t iteration = 0; iteration < numIterations && cancel == false; ++iteration)
|
||||
{
|
||||
auto trainingSample = mnistLoader.getSample(0);
|
||||
auto trainingSample = mnistLoader.getRandomSample();
|
||||
|
||||
emit logMessage(QString("training sample ") + QString::number(trainingSample.label));
|
||||
// emit logMessage(QString("training sample ") + QString::number(trainingSample.label));
|
||||
emit sampleImageLoaded(trainingSample.toQImage());
|
||||
|
||||
std::vector<double> targetValues =
|
||||
|
@ -49,12 +49,7 @@ void NetLearner::run()
|
|||
|
||||
double error = outputValues[0] - targetValues[0];
|
||||
|
||||
QString logString;
|
||||
|
||||
logString.append("Error: ");
|
||||
logString.append(QString::number(std::abs(error)));
|
||||
|
||||
emit logMessage(logString);
|
||||
emit logMessage(QString("Error: ") + QString::number(std::abs(error)));
|
||||
emit currentNetError(error);
|
||||
emit progress((double)iteration / (double)numIterations);
|
||||
|
||||
|
|
Loading…
Reference in a new issue