Commit ff2fd9cf authored by Davis King's avatar Davis King

Changed the trainer to be a little more robust.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403549
parent 0c546e96
......@@ -342,6 +342,13 @@ namespace dlib
}
// Don't let the step size get too big. Otherwise we might pick huge steps
// over and over that don't improve the cutting plane approximation.
if (opt_k > 1.0)
{
opt_k = 1.0;
}
// take the step suggested by the line search
best_so_far = (1-opt_k)*best_so_far + opt_k*w;
......
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