Update visualize tool to adopt the change of builtin code

PiperOrigin-RevId: 336755842
Change-Id: I43f1ecd87baee6b8587b039a7667152a042c49ac
This commit is contained in:
Jaesung Chung 2020-10-12 15:22:10 -07:00 committed by TensorFlower Gardener
parent 6777b83b40
commit 1bfed17f40

View File

@ -452,6 +452,10 @@ def CreateHtmlFile(tflite_input, html_output):
("custom_code", None),
("version", None)]
# Update builtin code fields.
for idx, d in enumerate(data["operator_codes"]):
d["builtin_code"] = max(d["builtin_code"], d["deprecated_builtin_code"])
for subgraph_idx, g in enumerate(data["subgraphs"]):
# Subgraph local specs on what to display
html += "<div class='subgraph'>"