From 4904c5f7af894189f90afe31a2609b5e01af9e9e Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=84=B8=ED=9D=AC/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Principal=20Engineer/=EC=82=BC=EC=84=B1?= =?utf8?q?=EC=A0=84=EC=9E=90?= Date: Thu, 29 Nov 2018 15:12:59 +0900 Subject: [PATCH] [tfldump] Tool to dump TFlite file (#2444) This will introduce empty project for tfldump tool to dump TFlite file to console in text form. Signed-off-by: SaeHie Park --- contrib/tfldump/.FORMATCHECKED | 0 contrib/tfldump/CMakeLists.txt | 4 ++++ contrib/tfldump/driver/Driver.cpp | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 contrib/tfldump/.FORMATCHECKED create mode 100644 contrib/tfldump/CMakeLists.txt create mode 100644 contrib/tfldump/driver/Driver.cpp diff --git a/contrib/tfldump/.FORMATCHECKED b/contrib/tfldump/.FORMATCHECKED new file mode 100644 index 0000000..e69de29 diff --git a/contrib/tfldump/CMakeLists.txt b/contrib/tfldump/CMakeLists.txt new file mode 100644 index 0000000..6d328f1 --- /dev/null +++ b/contrib/tfldump/CMakeLists.txt @@ -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 index 0000000..0afe727 --- /dev/null +++ b/contrib/tfldump/driver/Driver.cpp @@ -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 + +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; +} -- 2.7.4