From f1a99995c4aff46206735b2e6e738e4bdebb7234 Mon Sep 17 00:00:00 2001 From: npochhi Date: Thu, 14 Mar 2019 14:01:34 +0530 Subject: [PATCH] Changed eps checking condition --- 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 1e4691e69d..ce6fdd877d 100644 --- a/modules/ml/src/ann_mlp.cpp +++ b/modules/ml/src/ann_mlp.cpp @@ -971,7 +971,7 @@ public: int count = inputs.rows; int iter = -1, max_iter = termCrit.maxCount*count; - double epsilon = termCrit.epsilon*count; + double epsilon = (termCrit.type & CV_TERMCRIT_EPS) ? termCrit.epsilon*count : 0; int l_count = layer_count(); int ivcount = layer_sizes[0];