* [nnfw_support_tflite] Introduce TensorUtils.h
This commit introduces TensorUtils.h in nnfw_support_tfilte library.
This header provides various helper functions over TfLiteTensor objects.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
* Remove irrelevant change
--- /dev/null
+#ifndef __NNFW_SUPPORT_TFLITE_TENSOR_UTILS_H__
+#define __NNFW_SUPPORT_TFLITE_TENSOR_UTILS_H__
+
+#include <tensorflow/contrib/lite/context.h>
+
+namespace nnfw
+{
+namespace support
+{
+namespace tflite
+{
+
+inline bool isFloatTensor(const TfLiteTensor *tensor)
+{
+ return tensor->type == kTfLiteFloat32;
+}
+
+inline bool isFeatureTensor(const TfLiteTensor *tensor)
+{
+ return (tensor->dims->size == 4) && (tensor->dims->data[0] == 1);
+}
+
+} // namespace tflite
+} // namespace support
+} // namespace nnfw
+
+#endif // __NNFW_SUPPORT_TFLITE_TENSOR_UTILS_H__
#include "support/tflite/FeatureView.h"
+#include "support/tflite/TensorUtils.h"
#include <cassert>
namespace tflite
{
-inline bool isFloatTensor(const TfLiteTensor *tensor)
-{
- return tensor->type == kTfLiteFloat32;
-}
-
-inline bool isFeatureTensor(const TfLiteTensor *tensor)
-{
- return (tensor->dims->size == 4) && (tensor->dims->data[0] == 1);
-}
-
nnfw::util::feature::Shape getFeatureShape(const TfLiteTensor *tensor)
{
nnfw::util::feature::Shape shape;