aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/lite/tools
diff options
context:
space:
mode:
authorGravatar Yunlu Li <yunluli@google.com>2018-09-11 17:45:23 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-09-11 17:49:27 -0700
commitd77ec7f18fe9f4b03f7259a0003b966b6be28d03 (patch)
treea48cafa03bc1fa38c642f6040976c2a4b81849b0 /tensorflow/contrib/lite/tools
parentf4de1e737c914618e6fcefac5918fe73945ef9fb (diff)
Make the visualization tool handle null shape gracefully.
PiperOrigin-RevId: 212556651
Diffstat (limited to 'tensorflow/contrib/lite/tools')
-rw-r--r--tensorflow/contrib/lite/tools/visualize.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/contrib/lite/tools/visualize.py b/tensorflow/contrib/lite/tools/visualize.py
index 597dede63b..d7eea79399 100644
--- a/tensorflow/contrib/lite/tools/visualize.py
+++ b/tensorflow/contrib/lite/tools/visualize.py
@@ -202,7 +202,7 @@ class TensorMapper(object):
html += str(i) + " "
html += tensor["name"] + " "
html += str(tensor["type"]) + " "
- html += repr(tensor["shape"]) + "<br>"
+ html += (repr(tensor["shape"]) if "shape" in tensor else "[]") + "<br>"
html += "</span>"
html += repr(x)
html += "</span>"