Merge pull request #19417 from LupusSanctus:am/text_graph_identity

* Corrected SSD text graph generation for Identity nodes

* Added minor code corrections
pull/19559/head
Anastasia M 4 years ago committed by GitHub
parent 8d21c84e7d
commit eb90186614
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      samples/dnn/tf_text_graph_common.py

@ -270,7 +270,11 @@ def removeIdentity(graph_def):
identities = {}
for node in graph_def.node:
if node.op == 'Identity' or node.op == 'IdentityN':
identities[node.name] = node.input[0]
inp = node.input[0]
if inp in identities:
identities[node.name] = identities[inp]
else:
identities[node.name] = inp
graph_def.node.remove(node)
for node in graph_def.node:

Loading…
Cancel
Save