Skip to content

Commit a0e08d9

Browse files
authored
Fall back to non optimized model proto
Fixes a bug where if the transpose optimizer fails, the proto will not be written.
1 parent 607d780 commit a0e08d9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tf2onnx/convert.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ def main():
101101
input_names=args.inputs,
102102
output_names=args.outputs,
103103
inputs_as_nchw=args.inputs_as_nchw)
104-
104+
105+
model_proto = g.make_model("converted from {}".format(args.input))
106+
105107
new_model_proto = GraphUtil.opt_transposes_with_graph(g, "converted from {}".format(args.input),
106108
optimize=not args.continue_on_error)
107109
if new_model_proto:

0 commit comments

Comments
 (0)