Skip to content

Commit 671f22e

Browse files
committed
removed debug statements and small fix
1 parent 55c2873 commit 671f22e

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

tf2onnx/convert.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ def from_keras3(model, input_signature=None, opset=None, custom_ops=None, custom
464464

465465

466466
valid_names = []
467-
for out in model.output_names:
467+
for out in [t.name for t in model.outputs]:
468468
if out in reverse_lookup:
469469
valid_names.append(reverse_lookup[out])
470470
else:
@@ -481,9 +481,6 @@ def from_keras3(model, input_signature=None, opset=None, custom_ops=None, custom
481481
with tf.device("/cpu:0"):
482482
frozen_graph, initialized_tables = \
483483
tf_loader.from_trackable(model, concrete_func, input_names, output_names, large_model)
484-
485-
for node in frozen_graph.node:
486-
print(node.name, node.op)
487484
model_proto, external_tensor_storage = _convert_common(
488485
frozen_graph,
489486
name=model.name,
@@ -504,9 +501,6 @@ def from_keras3(model, input_signature=None, opset=None, custom_ops=None, custom
504501
tensors_to_rename=tensors_to_rename,
505502
initialized_tables=initialized_tables,
506503
output_path=output_path)
507-
508-
#print(model_proto)
509-
510504
return model_proto, external_tensor_storage
511505

512506
def from_keras(model, input_signature=None, opset=None, custom_ops=None, custom_op_handlers=None,

0 commit comments

Comments
 (0)