Unify graphdef and graphdump (#453)
author박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 <jh1302.park@samsung.com>
Fri, 6 Apr 2018 02:15:10 +0000 (11:15 +0900)
committer김정현/동작제어Lab(SR)/Senior Engineer/삼성전자 <jh0822.kim@samsung.com>
Fri, 6 Apr 2018 02:15:10 +0000 (11:15 +0900)
This commit unifies graphdef and graphdump projects into tf_model_tools
(to make it easy to understand what they are).

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
tools/CMakeLists.txt
tools/graphdump/CMakeLists.txt [deleted file]
tools/tf_model_tools/CMakeLists.txt [new file with mode: 0644]
tools/tf_model_tools/scripts/README.md [moved from tools/graphdef/README.md with 100% similarity]
tools/tf_model_tools/scripts/decode.sh [moved from tools/graphdef/decode.sh with 77% similarity]
tools/tf_model_tools/scripts/encode.sh [moved from tools/graphdef/encode.sh with 77% similarity]
tools/tf_model_tools/tf_model_dump.cc [moved from tools/graphdump/src/graphdump.cc with 100% similarity]

index cf71ba7..3956899 100644 (file)
@@ -1,7 +1,4 @@
-# TODO add graphdump for arm cross build
-if(ROOTFS_ARM STREQUAL "")
-  add_subdirectory(graphdump)
-endif()
+add_subdirectory(tf_model_tools)
 add_subdirectory(tflite_run)
 add_subdirectory(tflite_benchmark)
 add_subdirectory(tflite_examples)
diff --git a/tools/graphdump/CMakeLists.txt b/tools/graphdump/CMakeLists.txt
deleted file mode 100644 (file)
index 7d6a462..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# NOTE Graph dump uses libtensorflow_graphdef
-# TODO Reduce indentation level
-  list(APPEND SRCS "src/graphdump.cc")
-
-  add_executable(graphdump ${SRCS})
-  target_link_libraries(graphdump tensorflow_graphdef)
diff --git a/tools/tf_model_tools/CMakeLists.txt b/tools/tf_model_tools/CMakeLists.txt
new file mode 100644 (file)
index 0000000..92a9a6d
--- /dev/null
@@ -0,0 +1,8 @@
+# NOTE Graph dump uses libtensorflow_graphdef
+# TODO Reduce indentation level
+if(TARGET tensorflow_graphdef)
+  list(APPEND SRCS "tf_model_dump.cc")
+
+  add_executable(tf_model_dump ${SRCS})
+  target_link_libraries(tf_model_dump tensorflow_graphdef)
+endif(TARGET tensorflow_graphdef)
similarity index 77%
rename from tools/graphdef/decode.sh
rename to tools/tf_model_tools/scripts/decode.sh
index 80b7f54..e428f50 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 TOOLCHAIN_BASE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-TENSORFLOW_BASE="${TOOLCHAIN_BASE}/../../externals/tensorflow"
+TENSORFLOW_BASE="${TOOLCHAIN_BASE}/../../../externals/tensorflow"
 
 PROTOC="protoc"
 
similarity index 77%
rename from tools/graphdef/encode.sh
rename to tools/tf_model_tools/scripts/encode.sh
index 68f03c7..33137be 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 TOOLCHAIN_BASE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-TENSORFLOW_BASE="${TOOLCHAIN_BASE}/../../externals/tensorflow"
+TENSORFLOW_BASE="${TOOLCHAIN_BASE}/../../../externals/tensorflow"
 
 PROTOC="protoc"