Skip to content

Commit d1847ff

Browse files
committed
fix a bug in find_output_consumers
1 parent affdbc3 commit d1847ff

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tests/backend_test_base.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ def run_onnxruntime(self, model_path, inputs, output_names):
7373
# opt.log_severity_level = 0
7474
# opt.log_verbosity_level = 255
7575
# opt.enable_profiling = True
76-
with open(model_path, 'rb') as f:
77-
onx = onnx.load(f)
7876
try:
7977
m = rt.InferenceSession(model_path, opt)
8078
except Fail as e:

tf2onnx/graph.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1286,7 +1286,10 @@ def find_output_consumers(self, output_name):
12861286
if output_name in node.input:
12871287
nodes.append(node)
12881288

1289-
# find consumers in sub graphs
1289+
for node in self.get_nodes():
1290+
# find consumers in sub graphs,
1291+
# should we keep an index of nodes including
1292+
# a subgraphs?
12901293
body_graphs = node.get_body_graphs()
12911294
if body_graphs:
12921295
for g in body_graphs.values():

0 commit comments

Comments
 (0)