Skip to content

Commit 8d29126

Browse files
committed
move to_delete up
1 parent 32e9bd3 commit 8d29126

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tf2onnx/rewriter/random_uniform.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ def rewrite_random_uniform_fold_const(g, ops):
6060
tmax_minus_tmin = mul.inputs[1].get_tensor_value()
6161
tmin = output.inputs[1].get_tensor_value()
6262
tmax = tmin + tmax_minus_tmin
63+
to_delete = list(set(match.get_nodes()))
6364
new_node = create_onnx_random_uniform_op(g, tmax, tmin, ru_op, output, to_delete)
6465
g.replace_all_inputs(ops, output.output[0], new_node.output[0])
65-
to_delete = list(set(match.get_nodes()))
6666
for n in to_delete:
6767
g.remove_node(n.name)
6868

0 commit comments

Comments
 (0)