Commit b700521b authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

fixed trim_weights in boosting (thanks to frankman for the patch; ticket #1231)

parent 216fbc00
......@@ -1439,7 +1439,7 @@ CvBoost::trim_weights()
for( i = 0; i < count; i++ )
{
double w = weak_eval->data.db[i];
if( sum > w )
if( sum <= 0 )
break;
sum -= w;
}
......
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