ohsewon / test

0 stars 0 forks source link

[ISSUE][CLOSED] [Tensor Type] the data type is not matched #303

Closed ohsewon closed 6 years ago

ohsewon commented 6 years ago

Issue by hello-ahn Thursday Jul 19, 2018 at 05:07 GMT Originally opened as https://github.sec.samsung.net/STAR/nnstreamer/issues/303


I'm trying to match the data type of Tensorflow lite and our system. It's quite different, however, and there is no exception value at the enum.

tensor_typedef.h
--------------------------------------------
typedef enum _nns_tensor_type {
  _NNS_INT32 = 0,
  _NNS_UINT32,
  _NNS_INT16,
  _NNS_UINT16,
  _NNS_INT8,
  _NNS_UINT8,
  _NNS_FLOAT64,
  _NNS_FLOAT32,

  _NNS_END,
} tensor_type;
tensorflow/contrib/lite/context.h
--------------------------------------------
typedef enum {
  kTfLiteNoType = 0,
  kTfLiteFloat32 = 1,
  kTfLiteInt32 = 2,
  kTfLiteUInt8 = 3,
  kTfLiteInt64 = 4,
  kTfLiteString = 5,
  kTfLiteBool = 6,
} TfLiteType;

As you see, there are some different values between tensor_type and TfLiteType. Since it could occur when we add another NNFW, like tensorflow or caffe, we don't need to make it identical. My suggestion is, how about adding _NNS_NOTYPE at tensor_type?