[TFLite] check supporting datatype
authorHyoungJoo Ahn <hello.ahn@samsung.com>
Tue, 25 Feb 2020 02:18:00 +0000 (11:18 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Wed, 26 Feb 2020 14:17:50 +0000 (06:17 -0800)
check supporting datatypes with meson_option and return the valid datatype

Signed-off-by: HyoungJoo Ahn <hello.ahn@samsung.com>
ext/nnstreamer/tensor_filter/tensor_filter_tensorflow_lite.cc

index 65e64a9..f9068e4 100644 (file)
@@ -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;
   }