mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 01:13:28 +08:00
Merge pull request #19417 from LupusSanctus:am/text_graph_identity
* Corrected SSD text graph generation for Identity nodes * Added minor code corrections
This commit is contained in:
parent
8d21c84e7d
commit
eb90186614
@ -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…
Reference in New Issue
Block a user