From 996aeecdaf529c47e8c4eacdb13fb781c1a6aeda Mon Sep 17 00:00:00 2001 From: Yu-Cheng Ling Date: Wed, 20 Mar 2019 18:28:26 -0700 Subject: [PATCH] Don't annotate _tflite_function_uuid when there's no OpHints PiperOrigin-RevId: 239517897 --- tensorflow/lite/python/op_hint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorflow/lite/python/op_hint.py b/tensorflow/lite/python/op_hint.py index c8a031ca17a..bd62ab7250d 100644 --- a/tensorflow/lite/python/op_hint.py +++ b/tensorflow/lite/python/op_hint.py @@ -728,10 +728,10 @@ def _find_all_hints_in_nodes(nodes): for node in nodes: attr = node.attr # This is an op hint if it has a FUNCTION_UUID_ATTR, otherwise skip - uuid = attr[OpHint.FUNCTION_UUID_ATTR].s if (OpHint.FUNCTION_UUID_ATTR not in attr or not attr[OpHint.FUNCTION_UUID_ATTR].s): continue + uuid = attr[OpHint.FUNCTION_UUID_ATTR].s # Start building function call_def = func_calls[uuid]