Commit 00e43a90 authored by Alexander Alekhin's avatar Alexander Alekhin

ml(ANN_MLP): ensure that train() call is always successful

parent 289a8da3
......@@ -948,7 +948,7 @@ public:
trained = true; // Enable call to CalcError
int iter = simulatedAnnealingSolver(s, params.initialT, params.finalT, params.coolingRatio, params.itePerStep, NULL, params.rEnergy);
trained =false;
return iter;
return iter + 1; // ensure that 'train()' call is always successful
}
int train_backprop( const Mat& inputs, const Mat& outputs, const Mat& _sw, TermCriteria termCrit )
......
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