projects
/
platform
/
upstream
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fbc221d
)
svmsgd.cpp, fix #6248
author
berak
<px1704@web.de>
Mon, 14 Mar 2016 07:02:09 +0000
(08:02 +0100)
committer
berak
<px1704@web.de>
Mon, 14 Mar 2016 07:02:09 +0000
(08:02 +0100)
add a cast to double, to make vs compilers happy
modules/ml/src/svmsgd.cpp
patch
|
blob
|
history
diff --git
a/modules/ml/src/svmsgd.cpp
b/modules/ml/src/svmsgd.cpp
index
ed452e3
..
ef5da6f
100644
(file)
--- 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<float>(sqrt(s
amples.total(
)) / normValue);
+ multiplier = static_cast<float>(sqrt(s
tatic_cast<double>(samples.total()
)) / normValue);
samples *= multiplier;
}