1 | initial version |
you can pass a result mat to ann->predict(), which will hold the logit values from the last layer:
Mat result;
float predicted = ann->predict(query, result);
cerr << predicted << " " << result << endl;
2 | No.2 Revision |
you can pass a result mat to ann->predict(), which will hold the logit values from the last layer:
Mat result;
float predicted = ann->predict(query, result);
cerr << predicted << " " << result << endl;
for N classes (output neurons), you will receive an [Nx1] float mat, the prediction value is derived from that internally by calling minMaxLoc().