Commit 094c357a authored by Davis King's avatar Davis King

Changed code to avoid an unnecessary computation.

parent 24cb1285
......@@ -788,7 +788,7 @@ namespace dlib
scalar_type best_val = dot(rowm(weights,0),x) - b(0);
unsigned long best_idx = 0;
for (unsigned long i = 0; i < labels.size(); ++i)
for (unsigned long i = 1; i < labels.size(); ++i)
{
scalar_type temp = dot(rowm(weights,i),x) - b(i);
if (temp > best_val)
......
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