Skip to content

Commit

Permalink
Change the way to set node name. (#2278)
Browse files Browse the repository at this point in the history
Signed-off-by: Jay Zhang <[email protected]>
  • Loading branch information
fatcat-z authored Dec 15, 2023
1 parent 07dfaa8 commit 85a10b5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tf2onnx/tflite_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,8 @@ def shape_to_tf_shape(dims):
if has_prequantized_output:
output_names = [get_prequant(out) for out in output_names]
onnx_node = helper.make_node(optype, input_names, output_names, name=output_names[0], **attr)
node_name = output_names[0] if output_names else utils.make_name(f"{optype}_Output")
onnx_node = helper.make_node(optype, input_names, output_names, name=node_name, **attr)
onnx_nodes.append(onnx_node)

inputs = [tensor_names[tflite_g.Inputs(i)] for i in range(tflite_g.InputsLength())]
Expand Down

0 comments on commit 85a10b5

Please sign in to comment.