Skip to content

Commit

Permalink
add safe_remove_nodes function in gemm_rewriter.py
Browse files Browse the repository at this point in the history
  • Loading branch information
JiayingGaoo committed Jun 27, 2019
1 parent 14b8d01 commit 4aa7ecc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tf2onnx/rewriter/gemm_rewriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def rewrite_gemm(g, ops):

ops.append(gemm)
g.replace_all_inputs(ops, add_node.output[0], gemm.output[0])
to_delete = [add_node, matmul_node]
g.safe_remove_nodes(to_delete)

# to_delete = [add_node, matmul_node, input_c_node]
# g.delete_nodes_without_dependency(to_delete)
return ops

0 comments on commit 4aa7ecc

Please sign in to comment.