diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-06-21 09:07:20 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-06-21 09:10:54 -0700 |
commit | 0ebf5e2a7ca265861608a6998dd860a53c015481 (patch) | |
tree | 8c2e0e9f8fb3c90ca72226944a9355893180377c /tensorflow/contrib/lite/kernels/split.cc | |
parent | 51ef92ccfa042523055640261b437ebaf3060a5d (diff) |
16-bit quantized Split support in TFLite interpreter
PiperOrigin-RevId: 201534122
Diffstat (limited to 'tensorflow/contrib/lite/kernels/split.cc')
-rw-r--r-- | tensorflow/contrib/lite/kernels/split.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tensorflow/contrib/lite/kernels/split.cc b/tensorflow/contrib/lite/kernels/split.cc index 43387df9ce..b144486041 100644 --- a/tensorflow/contrib/lite/kernels/split.cc +++ b/tensorflow/contrib/lite/kernels/split.cc @@ -76,8 +76,9 @@ TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) { TF_LITE_ENSURE_EQ(context, NumOutputs(node), op_context.params->num_splits); auto input_type = op_context.input->type; - TF_LITE_ENSURE(context, - input_type == kTfLiteFloat32 || input_type == kTfLiteUInt8); + TF_LITE_ENSURE(context, input_type == kTfLiteFloat32 || + input_type == kTfLiteUInt8 || + input_type == kTfLiteInt16); for (int i = 0; i < NumOutputs(node); ++i) { GetOutput(context, node, i)->type = input_type; } @@ -137,9 +138,14 @@ TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { TF_LITE_SPLIT(uint8_t); break; } + case kTfLiteInt16: { + TF_LITE_SPLIT(int16_t); + break; + } default: context->ReportError( - context, "Only float32 and uint8 are currently supported, got %d.", + context, + "Only float32, uint8 and int16 are currently supported, got %d.", op_context.input->type); return kTfLiteError; } |