Skip to content

Commit 9a6bb04

Browse files
authored
fix --tflite command line (#1360)
Signed-off-by: Guenther Schmuelling <[email protected]>
1 parent d4de5f3 commit 9a6bb04

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tf2onnx/convert.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ def _convert_common(frozen_graph, name="unknown", large_model=False, output_path
148148
external_tensor_storage = ExternalTensorStorage()
149149
if output_frozen_graph:
150150
utils.save_protobuf(output_frozen_graph, frozen_graph)
151-
tf.import_graph_def(frozen_graph, name='')
151+
if not kwargs.get("tflite_path"):
152+
tf.import_graph_def(frozen_graph, name='')
152153
g = process_tf_graph(tf_graph, const_node_values=const_node_values, **kwargs)
153154
onnx_graph = optimizer.optimize_graph(g)
154155
model_proto = onnx_graph.make_model("converted from {}".format(name),

0 commit comments

Comments
 (0)