Commit 6e6f37e5 authored by Davis King's avatar Davis King

Fixed some warnings and made the unit tests more robust.

parent 0af762c5
......@@ -465,7 +465,7 @@ namespace dlib
// First we use a coordinate descent method to initialize alpha.
double max_df = 0;
for (unsigned long iter = 0; iter < alpha.size()*2; ++iter)
for (long iter = 0; iter < alpha.size()*2; ++iter)
{
max_df = 0;
long best_r =0;
......
......@@ -328,8 +328,8 @@ namespace
lower = -4;
upper = 3;
solve_qp_box_using_smo(Q,b,alpha,lower, upper, 0.00000001, 100000);
solve_qp_box_constrained(Q,b,alpha2,lower, upper, 0.00000001, 10000);
solve_qp_box_using_smo(Q,b,alpha,lower, upper, 0.000000001, 500000);
solve_qp_box_constrained(Q,b,alpha2,lower, upper, 0.000000001, 50000);
dlog << LINFO << trans(alpha);
dlog << LINFO << trans(alpha2);
dlog << LINFO << "objective value: " << 0.5*trans(alpha)*Q*alpha + trans(b)*alpha;
......
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