1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-25 04:26:17 +08:00

Added possibility of getting any intermediate blob with thrifty memory management

This commit is contained in:
Aleksandr Rybnikov
2017-06-13 16:23:01 +03:00
committed by Maksim Shabunin
parent b18e35793a
commit aa0d8060de
18 changed files with 351 additions and 206 deletions

View File

@@ -119,16 +119,14 @@ int main(int argc, char **argv)
//! [Prepare blob]
//! [Set input blob]
net.setBlob(".data", inputBlob); //set the network input
net.setInput(inputBlob, "data"); //set the network input
//! [Set input blob]
//! [Make forward pass]
net.forward(); //compute output
Mat prob = net.forward("prob"); //compute output
//! [Make forward pass]
//! [Gather output]
Mat prob = net.getBlob("prob"); //gather output of "prob" layer
int classId;
double classProb;
getMaxClass(prob, &classId, &classProb);//find the best class