fixed compilation of some samples; fixed ANN_MLP::predict

This commit is contained in:
Vadim Pisarevsky
2014-07-30 22:53:46 +04:00
parent e368f17caf
commit 223cdcd0ee
4 changed files with 185 additions and 384 deletions

View File

@@ -262,9 +262,9 @@ public:
int cols = layer_sizes[j];
layer_out = Mat(dn, cols, CV_64F, data);
Mat w = weights[i].rowRange(0, layer_in.cols);
Mat w = weights[j].rowRange(0, layer_in.cols);
gemm(layer_in, w, 1, noArray(), 0, layer_out);
calc_activ_func( layer_out, weights[i] );
calc_activ_func( layer_out, weights[j] );
layer_in = layer_out;
}
@@ -682,6 +682,8 @@ public:
train_backprop( inputs, outputs, sw, termcrit ) :
train_rprop( inputs, outputs, sw, termcrit );
trained = true;
return iter;
}