diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-06-13 13:24:52 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-06-13 13:27:55 -0700 |
commit | b253e6b874d4f4d242b5d31777462cac146935d2 (patch) | |
tree | 8cf29928c90c20ea14c1cf665b1b8f80f6ec3a34 /tensorflow/contrib/lite/interpreter_test.cc | |
parent | 91034421a2422c24a177b8d4a46f9fc3d157be3f (diff) |
support int16-quantized data in TFLite interpreter.
PiperOrigin-RevId: 200442886
Diffstat (limited to 'tensorflow/contrib/lite/interpreter_test.cc')
-rw-r--r-- | tensorflow/contrib/lite/interpreter_test.cc | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/tensorflow/contrib/lite/interpreter_test.cc b/tensorflow/contrib/lite/interpreter_test.cc index 4c78466480..b977cb089c 100644 --- a/tensorflow/contrib/lite/interpreter_test.cc +++ b/tensorflow/contrib/lite/interpreter_test.cc @@ -106,10 +106,9 @@ TEST(BasicInterpreter, CheckAllocate) { TfLiteType type; size_t size; } cases[] = { - {kTfLiteFloat32, sizeof(float)}, - {kTfLiteInt32, sizeof(int32_t)}, - {kTfLiteUInt8, sizeof(uint8_t)}, - {kTfLiteInt64, sizeof(int64_t)}, + {kTfLiteFloat32, sizeof(float)}, {kTfLiteInt32, sizeof(int32_t)}, + {kTfLiteUInt8, sizeof(uint8_t)}, {kTfLiteInt64, sizeof(int64_t)}, + {kTfLiteInt16, sizeof(int16_t)}, }; for (auto test : cases) { @@ -134,6 +133,7 @@ TEST(BasicInterpreter, CheckResize) { const int32_t int32s[] = {-3, -4}; const uint8_t uint8s[] = {3, 4}; const int64_t int64s[] = {6, -7}; + const int16_t int16s[] = {8, -9}; struct { TfLiteType type; @@ -144,6 +144,7 @@ TEST(BasicInterpreter, CheckResize) { {kTfLiteInt32, sizeof(int32_t), reinterpret_cast<const char*>(int32s)}, {kTfLiteUInt8, sizeof(uint8_t), reinterpret_cast<const char*>(uint8s)}, {kTfLiteInt64, sizeof(int64_t), reinterpret_cast<const char*>(int64s)}, + {kTfLiteInt16, sizeof(int16_t), reinterpret_cast<const char*>(int16s)}, }; for (auto test : cases) { @@ -179,10 +180,8 @@ TEST(BasicInterpreter, CheckAlignment) { struct { TfLiteType type; } cases[] = { - {kTfLiteFloat32}, - {kTfLiteInt32}, - {kTfLiteUInt8}, - {kTfLiteInt64}, + {kTfLiteFloat32}, {kTfLiteInt32}, {kTfLiteUInt8}, + {kTfLiteInt64}, {kTfLiteInt16}, }; for (auto test : cases) { |