diff --git a/modules/ml/src/svmsgd.cpp b/modules/ml/src/svmsgd.cpp index ed452e35e..ef5da6f71 100644 --- a/modules/ml/src/svmsgd.cpp +++ b/modules/ml/src/svmsgd.cpp @@ -153,7 +153,7 @@ void SVMSGDImpl::normalizeSamples(Mat &samples, Mat &average, float &multiplier) double normValue = norm(samples); - multiplier = static_cast(sqrt(samples.total()) / normValue); + multiplier = static_cast(sqrt(static_cast(samples.total())) / normValue); samples *= multiplier; }