Skip to content

Commit 85a10b5

Browse files
authored
Change the way to set node name. (#2278)
Signed-off-by: Jay Zhang <[email protected]>
1 parent 07dfaa8 commit 85a10b5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tf2onnx/tflite_utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,8 @@ def shape_to_tf_shape(dims):
483483
if has_prequantized_output:
484484
output_names = [get_prequant(out) for out in output_names]
485485
onnx_node = helper.make_node(optype, input_names, output_names, name=output_names[0], **attr)
486+
node_name = output_names[0] if output_names else utils.make_name(f"{optype}_Output")
487+
onnx_node = helper.make_node(optype, input_names, output_names, name=node_name, **attr)
486488
onnx_nodes.append(onnx_node)
487489

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

0 commit comments

Comments
 (0)