aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/lite/interpreter.cc
diff options
context:
space:
mode:
authorGravatar Andrew Selle <aselle@google.com>2018-07-10 09:40:11 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-07-10 09:43:52 -0700
commit0c7e26bcf14afa88e882bfb8eeff682d268f52e7 (patch)
tree961d85183ab008f3c3dc8b8a527171e50a682b4e /tensorflow/contrib/lite/interpreter.cc
parent17d5ea36fcc2e8914687be12e39ac9b97d4d8ce7 (diff)
Make tensorflow lite interpreter have more helpful errors.
PiperOrigin-RevId: 203961654
Diffstat (limited to 'tensorflow/contrib/lite/interpreter.cc')
-rw-r--r--tensorflow/contrib/lite/interpreter.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/tensorflow/contrib/lite/interpreter.cc b/tensorflow/contrib/lite/interpreter.cc
index 521216a4f1..5f9e7e959f 100644
--- a/tensorflow/contrib/lite/interpreter.cc
+++ b/tensorflow/contrib/lite/interpreter.cc
@@ -565,6 +565,8 @@ TfLiteStatus Interpreter::PrepareOpsStartingAt(
nodes_and_registration_[node_index].second;
EnsureTensorsVectorCapacity();
if (OpPrepare(registration, &node) == kTfLiteError) {
+ context_.ReportError(&context_, "Node %d failed to prepare.\n",
+ node_index);
return kTfLiteError;
}
@@ -665,6 +667,8 @@ TfLiteStatus Interpreter::Invoke() {
EnsureTensorsVectorCapacity();
tensor_resized_since_op_invoke_ = false;
if (OpInvoke(registration, &node) == kTfLiteError) {
+ context_.ReportError(&context_, "Node %d failed to invoke.\n",
+ node_index);
status = kTfLiteError;
}