Browse Source

修复打印时间bug

leon 5 tháng trước cách đây
mục cha
commit
ec0a67a0d0
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      src/main.cpp

+ 1 - 0
src/main.cpp

@@ -18,6 +18,7 @@ void single_inference() {
   trt::Timer timer;
   for (int i = 0; i < 100; i++)
   {
+    timer.start();
     auto attr = resnet->forward(cvimg(image));
     printf("score : %lf, label : %d\n", attr.confidence, attr.class_label);
     timer.stop("BATCH1");