mirror of https://github.com/davisking/dlib.git
Just minor improvements.
--HG-- extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403503
This commit is contained in:
parent
60d25f3e72
commit
c2de9780a3
|
@ -175,7 +175,8 @@ namespace dlib
|
|||
if (cur_obj < best_obj)
|
||||
{
|
||||
best_obj = cur_obj;
|
||||
w = w_cur;
|
||||
// move w_cur into w
|
||||
w.swap(w_cur);
|
||||
}
|
||||
|
||||
|
||||
|
@ -200,8 +201,8 @@ namespace dlib
|
|||
// accuracy that is related to how big the error gap is
|
||||
scalar_type eps = std::min<scalar_type>(sub_eps, 0.1*(best_obj-cp_obj)) ;
|
||||
// just a sanaty check
|
||||
if (eps < 1e-7)
|
||||
eps = 1e-7;
|
||||
if (eps < 1e-16)
|
||||
eps = 1e-16;
|
||||
solve_qp_using_smo(K, vector_to_matrix(bs), alpha, eps, sub_max_iter);
|
||||
|
||||
// construct the w_cur that minimized the subproblem.
|
||||
|
|
Loading…
Reference in New Issue