1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-23 18:09:25 +08:00

improved speed of ENet processing.

This commit is contained in:
Vadim Pisarevsky
2017-04-25 18:44:14 +03:00
parent 3f5b465501
commit 9e26b24d04
7 changed files with 639 additions and 596 deletions

View File

@@ -98,14 +98,19 @@ int main(int argc, char **argv)
net.setBlob("", inputBlob); //set the network input
//! [Set input blob]
const int N = 3;
TickMeter tm;
tm.start();
//! [Make forward pass]
net.forward(); //compute output
//! [Make forward pass]
tm.stop();
for( int i = 0; i < N; i++ )
{
TickMeter tm_;
tm_.start();
net.forward(); //compute output
tm_.stop();
if( i == 0 || tm_.getTimeTicks() < tm.getTimeTicks() )
tm = tm_;
}
//! [Gather output]