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.cc | |
parent | 91034421a2422c24a177b8d4a46f9fc3d157be3f (diff) |
support int16-quantized data in TFLite interpreter.
PiperOrigin-RevId: 200442886
Diffstat (limited to 'tensorflow/contrib/lite/interpreter.cc')
-rw-r--r-- | tensorflow/contrib/lite/interpreter.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tensorflow/contrib/lite/interpreter.cc b/tensorflow/contrib/lite/interpreter.cc index ebb0aedc20..2f8205444d 100644 --- a/tensorflow/contrib/lite/interpreter.cc +++ b/tensorflow/contrib/lite/interpreter.cc @@ -334,6 +334,9 @@ TfLiteStatus Interpreter::BytesRequired(TfLiteType type, const int* dims, case kTfLiteFloat32: *bytes = sizeof(float) * count; break; + case kTfLiteInt16: + *bytes = sizeof(int16_t) * count; + break; case kTfLiteInt32: *bytes = sizeof(int32_t) * count; break; @@ -347,9 +350,9 @@ TfLiteStatus Interpreter::BytesRequired(TfLiteType type, const int* dims, *bytes = sizeof(bool) * count; break; default: - ReportError( - &context_, - "Only float32, int32, int64, uint8, bool supported currently."); + ReportError(&context_, + "Only float32, int16, int32, int64, uint8, bool supported " + "currently."); return kTfLiteError; } return kTfLiteOk; |