Changed code to avoid an unnecessary computation.

This commit is contained in:
Davis King 2013-06-22 21:43:13 -04:00
parent 24cb128534
commit 094c357ae2
1 changed files with 1 additions and 1 deletions

View File

@ -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)