[tf] Add operator dump in toco (#30)
author박세희/동작제어Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Mon, 5 Mar 2018 02:31:04 +0000 (11:31 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Mon, 5 Mar 2018 02:31:04 +0000 (11:31 +0900)
* [tf] Add operator dump in toco

This will dump operators in toco tool

* simplify for

externals/tensorflow/tensorflow/contrib/lite/toco/toco_tooling.cc

index 1b836fb..db98587 100644 (file)
@@ -302,6 +302,13 @@ void Transform(const TocoFlags& toco_flags, Model* model) {
     LOG(INFO) << "Estimated count of arithmetic ops: " << 1e-9 * ops_count
               << " billion (note that a multiply-add is counted as 2 ops).";
   }
+
+  std::cout << "=== Begin Operators in the model ===" << std::endl;
+  for (auto& op : model->operators) {
+    std::string name(OperatorTypeName(op->type));
+    std::cout << name << std::endl;
+  }
+  std::cout << "=== End Operators in the model ===" << std::endl;
 }
 
 void Export(const TocoFlags& toco_flags, const Model& model,