From 2c03c14f7b1a405205a94a9deb1979d71f6bd1fb Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Sun, 21 Nov 2010 13:54:19 +0000 Subject: [PATCH] probably fixed the bug in ANN::calc_output_scale with update_weights=true (ticket #558) --- modules/ml/src/ann_mlp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ml/src/ann_mlp.cpp b/modules/ml/src/ann_mlp.cpp index 9638b4b..d338e52 100644 --- a/modules/ml/src/ann_mlp.cpp +++ b/modules/ml/src/ann_mlp.cpp @@ -635,7 +635,7 @@ void CvANN_MLP::calc_output_scale( const CvVectors* vecs, int flags ) } else { - t = t*scale[j*2] + scale[2*j+1]; + t = t*inv_scale[j*2] + inv_scale[2*j+1]; if( t < m1 || t > M1 ) CV_ERROR( CV_StsOutOfRange, "Some of new output training vector components run exceed the original range too much" ); -- 2.7.4