aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/lite/interpreter.cc
diff options
context:
space:
mode:
authorGravatar Yu-Cheng Ling <ycling@google.com>2018-04-13 17:13:45 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-04-13 17:16:30 -0700
commit6048b07adb364fcef086fb30ecdfb8a2881ba6ac (patch)
treead9edbe8e065b2d07fa2b9a3748c7e3948176092 /tensorflow/contrib/lite/interpreter.cc
parent3d66977d99c1d37cf318557ea613cd0dd6b001fd (diff)
TFLite: Copy output data from BufferHandle to CPU memory by default.
PiperOrigin-RevId: 192846824
Diffstat (limited to 'tensorflow/contrib/lite/interpreter.cc')
-rw-r--r--tensorflow/contrib/lite/interpreter.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/tensorflow/contrib/lite/interpreter.cc b/tensorflow/contrib/lite/interpreter.cc
index f258654608..31b874a6a6 100644
--- a/tensorflow/contrib/lite/interpreter.cc
+++ b/tensorflow/contrib/lite/interpreter.cc
@@ -570,6 +570,12 @@ TfLiteStatus Interpreter::Invoke() {
}
}
+ if (!allow_buffer_handle_output_) {
+ for (int tensor_index : outputs_) {
+ EnsureTensorDataIsReadable(tensor_index);
+ }
+ }
+
return status;
}