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

Fixed randomDebug and increased history size

parent 8b6ba7d9
Branches
No related tags found
No related merge requests found
......@@ -28,12 +28,18 @@ void Trainer::setDebugValue()
if (!ProgramParameters::randomDebug)
return;
ProgramParameters::debug = choiceWithProbability(ProgramParameters::randomDebugProbability);
if (!ProgramParameters::debug)
return;
if (ProgramParameters::interactive)
fprintf(stderr, " \r");
fprintf(stderr, "\n");
if (ProgramParameters::printTime)
fprintf(stderr, "[%s] :\n", getTime().c_str());
ProgramParameters::debug = choiceWithProbability(ProgramParameters::randomDebugProbability);
}
void Trainer::computeScoreOnDev()
......@@ -58,6 +64,7 @@ void Trainer::computeScoreOnDev()
while (!devConfig->isFinal())
{
setDebugValue();
devConfig->setCurrentStateName(tm.getCurrentState());
Dict::currentClassifierName = tm.getCurrentClassifier()->name;
tm.getCurrentClassifier()->initClassifier(*devConfig);
......@@ -464,6 +471,7 @@ void Trainer::train()
resetAndShuffle();
while (!trainConfig.isFinal())
{
setDebugValue();
trainConfig.setCurrentStateName(tm.getCurrentState());
Dict::currentClassifierName = tm.getCurrentClassifier()->name;
tm.getCurrentClassifier()->initClassifier(trainConfig);
......
......@@ -134,7 +134,7 @@ class Config
private :
const unsigned int HISTORY_SIZE = 1000000;
const unsigned int HISTORY_SIZE = 100000000;
/// @brief The name of the current state of the TransitionMachine.
std::string currentStateName;
/// @brief For each state of the TransitionMachine, an history of the Action that have been applied to this Config.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment