From c770568935b85d506dc1a1f671822a7e122b5056 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Tue, 9 Oct 2018 16:48:34 -0700 Subject: Internal change. PiperOrigin-RevId: 216447412 --- tensorflow/contrib/lite/kernels/sparse_output_fully_connected.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tensorflow/contrib/lite/kernels/sparse_output_fully_connected.cc b/tensorflow/contrib/lite/kernels/sparse_output_fully_connected.cc index 843ed0768c..226bba2d47 100644 --- a/tensorflow/contrib/lite/kernels/sparse_output_fully_connected.cc +++ b/tensorflow/contrib/lite/kernels/sparse_output_fully_connected.cc @@ -88,6 +88,13 @@ TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) { const bool is_hybrid_op = (weights->type == kTfLiteUInt8 && input->type == kTfLiteFloat32); + // Resize output. + TfLiteTensor* output = GetOutput(context, node, kOutputTensor); + TfLiteIntArray* output_size_array = TfLiteIntArrayCreate(1); + output_size_array->data[0] = 1; + TF_LITE_ENSURE_OK(context, + context->ResizeTensor(context, output, output_size_array)); + if (is_hybrid_op) { TfLiteIntArrayFree(node->temporaries); node->temporaries = TfLiteIntArrayCreate(kNumTemporaryTensors); -- cgit v1.2.3