1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

fixed compile warnings from MSVC; fixed warnings in Python bindings; added some debugging code

This commit is contained in:
Vadim Pisarevsky
2014-08-03 12:46:28 +04:00
parent 9cb79b9abb
commit eeb786fcfd
10 changed files with 30 additions and 30 deletions
+4 -5
View File
@@ -123,7 +123,7 @@ public:
void clear()
{
min_val = max_val = min_val1 = max_val1 = 0.;
rng = RNG(-1);
rng = RNG((uint64)-1);
weights.clear();
trained = false;
}
@@ -300,7 +300,7 @@ public:
{
int maxIdx[] = {0, 0};
minMaxIdx(outputs, 0, 0, 0, maxIdx);
return maxIdx[0] + maxIdx[1];
return (float)(maxIdx[0] + maxIdx[1]);
}
return 0.f;
@@ -702,9 +702,8 @@ public:
train_backprop( inputs, outputs, sw, termcrit ) :
train_rprop( inputs, outputs, sw, termcrit );
trained = true;
return iter;
trained = iter > 0;
return trained;
}
int train_backprop( const Mat& inputs, const Mat& outputs, const Mat& _sw, TermCriteria termCrit )