aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/lite/interpreter.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-02-05 10:39:18 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-02-05 10:45:07 -0800
commitbccd80c45dab8f2856c176d45df7e7c72f35e14e (patch)
tree5429e28464f74889cc4ca8c179da0e35f6e61a80 /tensorflow/contrib/lite/interpreter.cc
parenta9034babfd0100f0b998e900d074dd3d839d18bc (diff)
Proper reallocation of dynamic tensors.
PiperOrigin-RevId: 184550199
Diffstat (limited to 'tensorflow/contrib/lite/interpreter.cc')
-rw-r--r--tensorflow/contrib/lite/interpreter.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/tensorflow/contrib/lite/interpreter.cc b/tensorflow/contrib/lite/interpreter.cc
index a8db149eaa..9dd60abc86 100644
--- a/tensorflow/contrib/lite/interpreter.cc
+++ b/tensorflow/contrib/lite/interpreter.cc
@@ -459,6 +459,9 @@ TfLiteStatus Interpreter::ResizeTensorImpl(TfLiteTensor* tensor,
TfLiteIntArrayFree(new_size);
return kTfLiteError;
}
+
+ // Realloc space for kTfLiteDynamic tensors.
+ TfLiteTensorRealloc(bytesRequired, tensor);
tensor->bytes = bytesRequired;
}
if (tensor->dims) TfLiteIntArrayFree(tensor->dims);