We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 966a65d + 1030373 commit d2baed0Copy full SHA for d2baed0
tf2onnx/graph.py
@@ -1212,7 +1212,10 @@ def _parse_graph_initializer(g, graph_proto):
1212
def _parse_graph_input(g, graph_proto, const_node_names):
1213
"""Get graph inputs not defined as initializers and put into Graph object."""
1214
shapes, dtypes = GraphUtil._parse_shape_and_type_from_value_infos(graph_proto.input)
1215
- for name in shapes:
+ # make sure the input is added in order we read from graph_proto,
1216
+ # because for subgraphs, the input orders matter.
1217
+ for graph_input in graph_proto.input:
1218
+ name = graph_input.name
1219
shape = shapes[name]
1220
dtype = dtypes[name]
1221
if name not in const_node_names:
0 commit comments