Reduced the progress update messages to take load from the UI,

implemented load-or-create in test funtion
This commit is contained in:
Michael Mandl 2015-10-26 19:50:01 +01:00
parent 9bb927d2d2
commit 1e716979a9
3 changed files with 44 additions and 22 deletions

View file

@ -9,7 +9,15 @@ void NetLearner::run()
{
QElapsedTimer timer;
Net myNet({2, 3, 1});
Net myNet;
try
{
myNet.load("mynet.nnet");
}
catch (...)
{
myNet.initialize({2, 3, 1});
}
size_t batchSize = 5000;
size_t batchIndex = 0;
@ -54,6 +62,7 @@ void NetLearner::run()
emit logMessage(logString);
emit currentNetError(batchMaxError);
emit progress((double)iteration / (double)numIterations);
batchIndex = 0;
batchMaxError = 0.0;
@ -61,8 +70,6 @@ void NetLearner::run()
}
myNet.backProp(targetValues);
emit progress((double)iteration / (double)numIterations);
}
QString timerLogString;