[tfldump] Tool to dump TFlite file (#2444)
author박세희/동작제어Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Thu, 29 Nov 2018 06:12:59 +0000 (15:12 +0900)
committer박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Thu, 29 Nov 2018 06:12:59 +0000 (15:12 +0900)
This will introduce empty project for tfldump tool to dump TFlite file to console in text form.

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
contrib/tfldump/.FORMATCHECKED [new file with mode: 0644]
contrib/tfldump/CMakeLists.txt [new file with mode: 0644]
contrib/tfldump/driver/Driver.cpp [new file with mode: 0644]

diff --git a/contrib/tfldump/.FORMATCHECKED b/contrib/tfldump/.FORMATCHECKED
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/contrib/tfldump/CMakeLists.txt b/contrib/tfldump/CMakeLists.txt
new file mode 100644 (file)
index 0000000..6d328f1
--- /dev/null
@@ -0,0 +1,4 @@
+set(DRIVER "driver/Driver.cpp")
+
+add_executable(tfldump ${DRIVER})
+target_link_libraries(tfldump safemain)
diff --git a/contrib/tfldump/driver/Driver.cpp b/contrib/tfldump/driver/Driver.cpp
new file mode 100644 (file)
index 0000000..0afe727
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <iostream>
+
+int entry(int argc, char **argv)
+{
+  if (argc != 2)
+  {
+    std::cerr << "ERROR: Failed to parse arguments" << std::endl;
+    std::cerr << std::endl;
+    std::cerr << "USAGE: " << argv[0] << " [tflite]" << std::endl;
+    return 255;
+  }
+
+  // TODO load TFlite file
+
+  // TODO dump TFlite model
+
+  return 0;
+}