From d66277a24d65c6e2c1baa4e2c9ebb7fa563554d6 Mon Sep 17 00:00:00 2001 From: HyoungJoo Ahn Date: Tue, 25 Feb 2020 11:18:00 +0900 Subject: [PATCH] [TFLite] check supporting datatype check supporting datatypes with meson_option and return the valid datatype Signed-off-by: HyoungJoo Ahn --- .../tensor_filter/tensor_filter_tensorflow_lite.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ext/nnstreamer/tensor_filter/tensor_filter_tensorflow_lite.cc b/ext/nnstreamer/tensor_filter/tensor_filter_tensorflow_lite.cc index 65e64a9..f9068e4 100644 --- a/ext/nnstreamer/tensor_filter/tensor_filter_tensorflow_lite.cc +++ b/ext/nnstreamer/tensor_filter/tensor_filter_tensorflow_lite.cc @@ -320,12 +320,25 @@ TFLiteInterpreter::getTensorType (TfLiteType tfType) case kTfLiteInt32: return _NNS_INT32; case kTfLiteBool: +#ifdef TFLITE_INT8 case kTfLiteInt8: +#endif return _NNS_INT8; +#ifdef TFLITE_INT16 + case kTfLiteInt16: + return _NNS_INT16; +#endif case kTfLiteInt64: return _NNS_INT64; case kTfLiteString: +#ifdef TFLITE_COMPLEX64 + case kTfLiteComplex64: +#endif +#ifdef TFLITE_FLOAT16 + case kTfLiteFloat16: +#endif default: + g_critical ("Not supported Tensorflow Data Type: [%d].", tfType); /** @todo Support other types */ break; } -- 2.7.4