diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-10-09 16:48:34 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-10-09 16:55:17 -0700 |
commit | c770568935b85d506dc1a1f671822a7e122b5056 (patch) | |
tree | df97d2ee21acf278bc4ec59f5ead5f15600758b9 | |
parent | ef9d2e7be9ae9fbcd4720d46e1f8a8cac902a1cd (diff) |
Internal change.
PiperOrigin-RevId: 216447412
-rw-r--r-- | tensorflow/contrib/lite/kernels/sparse_output_fully_connected.cc | 7 |
1 files changed, 7 insertions, 0 deletions
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); |