"git@developer.sourcefind.cn:OpenDAS/dgl.git" did not exist on "635dfb4a591c23adda9019cb79b081773feb558b"
Commit ff2fd9cf authored by Davis King's avatar Davis King
Browse files

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 ...@@ -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 // take the step suggested by the line search
best_so_far = (1-opt_k)*best_so_far + opt_k*w; 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