Added a missing check for division by zero.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403578
This commit is contained in:
Davis King 2010-05-07 21:13:16 +00:00
parent 42a4f363c6
commit bc7898c018
1 changed files with 3 additions and 0 deletions

View File

@ -125,6 +125,9 @@ namespace dlib
cout << endl; cout << endl;
} }
if (current_objective_value == 0)
return true;
if (current_error_gap/current_objective_value < eps) if (current_error_gap/current_objective_value < eps)
return true; return true;