[tflite2circle] add SparseIndexVector_NONE type (#4054)
authorseongwoo chae <mhs4670go@naver.com>
Tue, 1 Sep 2020 21:27:20 +0000 (06:27 +0900)
committerGitHub <noreply@github.com>
Tue, 1 Sep 2020 21:27:20 +0000 (06:27 +0900)
This commit adds SparseIndexVector_NONE type.

ONE-DCO-1.0-Signed-off-by: seongwoo <mhs4670go@naver.com>

compiler/tflite2circle/src/DataLookup.cpp

index 7122cdf..75504b0 100644 (file)
@@ -143,6 +143,8 @@ get_circle_sparse_index_vector(flatbuffers::FlatBufferBuilder &fb,
 {
   switch (tfl_sparse_index_vector_type)
   {
+    case tflite::SparseIndexVector_NONE:
+      return flatbuffers::Offset<void>();
     case tflite::SparseIndexVector_Int32Vector:
     {
       auto values_vec_int32 =
@@ -183,6 +185,8 @@ get_circle_sparse_index_vector_type(const tflite::SparseIndexVector &tfl_sparse_
 {
   switch (tfl_sparse_index_vector_type)
   {
+    case tflite::SparseIndexVector_NONE:
+      return circle::SparseIndexVector_NONE;
     case tflite::SparseIndexVector_Int32Vector:
       return circle::SparseIndexVector_Int32Vector;
     case tflite::SparseIndexVector_Uint16Vector: