summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
author오형석/동작제어Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>2018-12-12 17:39:07 +0900
committerGitHub Enterprise <noreply-CODE@samsung.com>2018-12-12 17:39:07 +0900
commitde99a7c02ebb549a6e3b212ea2a91e8405bcf51e (patch)
tree2fe2b36f423929a9069c571b84aa9e53821ce2b3 /contrib
parent3752f7fa98c34bba86b0eb3b5032c0e600f6cea0 (diff)
downloadnnfw-de99a7c02ebb549a6e3b212ea2a91e8405bcf51e.tar.gz
nnfw-de99a7c02ebb549a6e3b212ea2a91e8405bcf51e.tar.bz2
nnfw-de99a7c02ebb549a6e3b212ea2a91e8405bcf51e.zip
Update namespace and ifdef for tflite library (#3968)
* Update namespace and ifdef for tflite library Make tflite/extend directory for ported codes from public tensorflow Update namespace except extended directory Update ifdef in header Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com> * Rename tflite/extend to tflite/ext * Fix format * Update ifdef in ext * Flatten namespace nnfw::tflite::interp to nnfw::tflite * Add comment for endif
Diffstat (limited to 'contrib')
-rw-r--r--contrib/tf_test/tf_test.cpp8
-rw-r--r--contrib/tflite_classify/src/InferenceInterface.cc4
-rw-r--r--contrib/tflite_classify/src/InferenceInterface.h4
3 files changed, 8 insertions, 8 deletions
diff --git a/contrib/tf_test/tf_test.cpp b/contrib/tf_test/tf_test.cpp
index 56ec1d2a9..20c5c5839 100644
--- a/contrib/tf_test/tf_test.cpp
+++ b/contrib/tf_test/tf_test.cpp
@@ -21,7 +21,7 @@
#include "tflite/Session.h"
#include "tflite/InterpreterSession.h"
#include "tflite/NNAPISession.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "util/fp32.h"
@@ -114,15 +114,15 @@ int main(int argc, char **argv)
auto lite_model = BuildModelFromFile(lite_model_path);
auto lite_interp = BuildInterpFromModel(lite_model);
- std::shared_ptr<nnfw::support::tflite::Session> lite_sess;
+ std::shared_ptr<nnfw::tflite::Session> lite_sess;
if (use_nnapi)
{
- lite_sess = std::make_shared<nnfw::support::tflite::NNAPISession>(lite_interp.get());
+ lite_sess = std::make_shared<nnfw::tflite::NNAPISession>(lite_interp.get());
}
else
{
- lite_sess = std::make_shared<nnfw::support::tflite::InterpreterSession>(lite_interp.get());
+ lite_sess = std::make_shared<nnfw::tflite::InterpreterSession>(lite_interp.get());
}
//
diff --git a/contrib/tflite_classify/src/InferenceInterface.cc b/contrib/tflite_classify/src/InferenceInterface.cc
index 27d338274..160943477 100644
--- a/contrib/tflite_classify/src/InferenceInterface.cc
+++ b/contrib/tflite_classify/src/InferenceInterface.cc
@@ -31,11 +31,11 @@ InferenceInterface::InferenceInterface(const std::string &model_file, const bool
if (use_nnapi)
{
- _sess = std::make_shared<nnfw::support::tflite::NNAPISession>(_interpreter.get());
+ _sess = std::make_shared<nnfw::tflite::NNAPISession>(_interpreter.get());
}
else
{
- _sess = std::make_shared<nnfw::support::tflite::InterpreterSession>(_interpreter.get());
+ _sess = std::make_shared<nnfw::tflite::InterpreterSession>(_interpreter.get());
}
_sess->prepare();
diff --git a/contrib/tflite_classify/src/InferenceInterface.h b/contrib/tflite_classify/src/InferenceInterface.h
index b15a0444f..06ebb3dad 100644
--- a/contrib/tflite_classify/src/InferenceInterface.h
+++ b/contrib/tflite_classify/src/InferenceInterface.h
@@ -23,7 +23,7 @@
#ifndef __TFLITE_CLASSIFY_INFERENCE_INTERFACE_H__
#define __TFLITE_CLASSIFY_INFERENCE_INTERFACE_H__
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tflite/InterpreterSession.h"
@@ -87,7 +87,7 @@ public:
private:
std::unique_ptr<tflite::Interpreter> _interpreter;
std::unique_ptr<tflite::FlatBufferModel> _model;
- std::shared_ptr<nnfw::support::tflite::Session> _sess;
+ std::shared_ptr<nnfw::tflite::Session> _sess;
};
#endif // __TFLITE_CLASSIFY_INFERENCE_INTERFACE_H__