Reduce indent level in tflite_run (#464)
author이한종/동작제어Lab(SR)/Engineer/삼성전자 <hanjoung.lee@samsung.com>
Thu, 5 Apr 2018 11:51:38 +0000 (20:51 +0900)
committer오형석/동작제어Lab(SR)/Senior Engineer/삼성전자 <hseok82.oh@samsung.com>
Thu, 5 Apr 2018 11:51:38 +0000 (20:51 +0900)
Reduce indent level in tflite_run

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
tools/tflite_run/src/tflite_run.cc

index 26eb30b..f2d8ad8 100644 (file)
@@ -145,20 +145,15 @@ int main(const int argc, char **argv)
     assert(status == kTfLiteOk);
   };
 
-  // NOTE Block is introduced to minimize code diff
-  // TODO Reduce nesting level
-  {
-    std::cout << "output tensor indices = [";
-    for( const auto& o : interpreter->outputs() ) {
-      std::cout << o << "(";
+  std::cout << "output tensor indices = [";
+  for( const auto& o : interpreter->outputs() ) {
+    std::cout << o << "(";
 
-      print_max_idx(interpreter->tensor(o)->data.f, interpreter->tensor(o)->bytes/sizeof(float));
-
-      std::cout << "),";
-    }
-    std::cout << "]" << std::endl;
+    print_max_idx(interpreter->tensor(o)->data.f, interpreter->tensor(o)->bytes/sizeof(float));
 
+    std::cout << "),";
   }
+  std::cout << "]" << std::endl;
 
   std::cout << "Prepare takes " << t_prepare.count() << " seconds" << std::endl;
   std::cout << "Invoke takes " << t_invoke.count() << " seconds" << std::endl;