mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
Changed code to avoid an unnecessary computation.
This commit is contained in:
parent
24cb128534
commit
094c357ae2
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user