Commit d9f71201 authored by remi cresson's avatar remi cresson
Browse files

FIX: validation step not performed if not user parameters are set

parent 58e508bd
......@@ -438,6 +438,7 @@ public:
}
// Setup the validation filter
const bool do_validation = HasUserValue("validation.mode");
if (GetParameterInt("validation.mode")==1) // class
{
otbAppLogINFO("Set validation mode to classification validation");
......@@ -467,6 +468,8 @@ public:
AddProcess(m_TrainModelFilter, "Training epoch #" + std::to_string(epoch));
m_TrainModelFilter->Update();
if (do_validation)
{
// Validate the model
if (epoch % GetParameterInt("validation.step") == 0)
{
......@@ -511,6 +514,7 @@ public:
PrintClassificationMetrics(m_ValidateModelFilter->GetConfusionMatrix(i), m_ValidateModelFilter->GetMapOfClasses(i));
}
} // Step is OK to perform validation
}
} // Next epoch
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment