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

Corrected order of trainStrategy applications : removed possibility of...

Corrected order of trainStrategy applications : removed possibility of parameter reset before dynamic example extracting
parent a2fddd00
No related branches found
No related tags found
No related merge requests found
......@@ -205,7 +205,7 @@ int MacaonTrain::main()
if (entry.is_regular_file())
std::filesystem::remove(entry.path());
}
if (trainStrategy[currentEpoch].count(Trainer::TrainAction::ExtractGold))
if (trainStrategy[currentEpoch].count(Trainer::TrainAction::ExtractGold) or trainStrategy[currentEpoch].count(Trainer::TrainAction::ExtractDynamic))
{
machine.setDictsState(Dict::State::Open);
trainer.createDataset(goldConfig, debug, modelPath/"examples/train", currentEpoch, trainStrategy[currentEpoch].count(Trainer::TrainAction::ExtractDynamic));
......@@ -227,16 +227,6 @@ int MacaonTrain::main()
machine.getClassifier()->resetOptimizer();
}
if (trainStrategy[currentEpoch].count(Trainer::TrainAction::ExtractDynamic))
{
machine.setDictsState(Dict::State::Open);
trainer.createDataset(goldConfig, debug, modelPath/"examples/train", currentEpoch, trainStrategy[currentEpoch].count(Trainer::TrainAction::ExtractDynamic));
if (!computeDevScore)
{
machine.setDictsState(Dict::State::Closed);
trainer.createDataset(devGoldConfig, debug, modelPath/"examples/dev", currentEpoch, trainStrategy[currentEpoch].count(Trainer::TrainAction::ExtractDynamic));
}
}
if (trainStrategy[currentEpoch].count(Trainer::TrainAction::Save))
{
saved = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment