Skip to content
Snippets Groups Projects
Commit 256a9f80 authored by Franck Dary's avatar Franck Dary
Browse files

Cosmetic change to code

parent fc449707
No related branches found
No related tags found
No related merge requests found
......@@ -400,10 +400,6 @@ void Trainer::doStepTrain()
if (TI.lastActionWasPredicted[normalStateName])
{
if (ProgramParameters::debug)
{
fprintf(stderr, "Updating neural network \'%s\'\n", tm.getCurrentClassifier()->name.c_str());
}
if (newCost >= lastCost)
{
loss = tm.getCurrentClassifier()->trainOnExample(pendingFD[tm.getCurrentClassifier()->name], tm.getCurrentClassifier()->getActionIndex("EPSILON"));
......@@ -411,8 +407,14 @@ void Trainer::doStepTrain()
else
{
loss = tm.getCurrentClassifier()->trainOnExample(pendingFD[tm.getCurrentClassifier()->name], tm.getCurrentClassifier()->getActionIndex(trainConfig.getCurrentStateHistory().top()));
if (ProgramParameters::debug)
fprintf(stderr, "Updating neural network \'%s\', gold=\'%s\'\n", tm.getCurrentClassifier()->name.c_str(), trainConfig.getCurrentStateHistory().top().c_str());
}
if (ProgramParameters::debug)
fprintf(stderr, "Updating neural network \'%s\'\n", tm.getCurrentClassifier()->name.c_str());
TI.addTrainLoss(tm.getCurrentClassifier()->name, loss);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment