Skip to content

Commit 074308b

Browse files
authored
Merge pull request #2 from gcunhase/qdq
Fix concat issue by enabling access to the 'optimizers' variable
2 parents 8894212 + 175ad26 commit 074308b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tf2onnx/convert.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def default_custom_op_handler(ctx, node, name, args):
138138

139139

140140
def _convert_common(frozen_graph, name="unknown", large_model=False, output_path=None,
141-
output_frozen_graph=None, custom_ops=None, custom_op_handlers=None, **kwargs):
141+
output_frozen_graph=None, custom_ops=None, custom_op_handlers=None, optimizers=None, **kwargs):
142142
"""Common processing for conversion."""
143143

144144
model_proto = None
@@ -165,7 +165,7 @@ def _convert_common(frozen_graph, name="unknown", large_model=False, output_path
165165
catch_errors = constants.ENV_TF2ONNX_CATCH_ERRORS.upper() == "TRUE"
166166
else:
167167
catch_errors = not large_model
168-
onnx_graph = optimizer.optimize_graph(g, catch_errors)
168+
onnx_graph = optimizer.optimize_graph(g, catch_errors, optimizers=optimizers)
169169
model_proto = onnx_graph.make_model("converted from {}".format(name),
170170
external_tensor_storage=external_tensor_storage)
171171
if output_path:

0 commit comments

Comments
 (0)