Fix output name collision for incorrect ONNX models (#1930)
This commit is contained in:
parent
7b79db8cc8
commit
b9f698b456
@ -85,7 +85,9 @@ def protobuf2nx(graph, pb):
|
||||
for outp in pb.graph.output:
|
||||
name = str(outp.name)
|
||||
if graph.has_node(name):
|
||||
raise Error('Name {} of output node already exists in graph.', name)
|
||||
log.error('Name {} of output node already exists in graph. Ignoring this output. If the output is required,'
|
||||
' please rename it.'.format(name), extra={'is_warning': True})
|
||||
continue
|
||||
else:
|
||||
# add fake node on output
|
||||
graph.add_node(name, kind='op', op='FakeOutput', pb=outp)
|
||||
|
Loading…
Reference in New Issue
Block a user