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.
1 parent 6d1f789 commit b75fe78Copy full SHA for b75fe78
tf2onnx/convert.py
@@ -328,7 +328,8 @@ def _rename_duplicate_keras_model_names(model):
328
IMPORTANT: model may be edited. Assign model.output_names to old_out_names to restore.
329
"""
330
old_out_names = None
331
- if model.output_names and len(set(model.output_names)) != len(model.output_names):
+ if hasattr(model, "output_names") and model.output_names \
332
+ and len(set(model.output_names)) != len(model.output_names):
333
# In very rare cases, keras has a bug where it will give multiple outputs the same name
334
# We must edit the model or the TF trace will fail
335
old_out_names = model.output_names
0 commit comments