Merge pull request #6395 from Tauranis:master

pull/6399/head
Maksim Shabunin 9 years ago
commit 49b4af1e5c
  1. 11
      modules/ml/src/ann_mlp.cpp

@ -432,8 +432,15 @@ public:
double* data = sums.ptr<double>(i);
for( j = 0; j < cols; j++ )
{
double t = scale2*(1. - data[j])/(1. + data[j]);
data[j] = t;
if(!cvIsInf(data[j]))
{
double t = scale2*(1. - data[j])/(1. + data[j]);
data[j] = t;
}
else
{
data[j] = -scale2;
}
}
}
break;

Loading…
Cancel
Save