Skip to content

Commit

Permalink
fix convbn fusion bug
Browse files Browse the repository at this point in the history
  • Loading branch information
inisis committed Nov 12, 2024
1 parent 8c82f56 commit 0e51815
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion onnxslim/core/pattern/fusion/convbn.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def rewrite(self, opset=11):
conv_transpose_node = self.conv_0
conv_transpose_node_users = get_node_users(conv_transpose_node)
node = self.bn_0
if len(conv_transpose_node_users) == 1:
if len(conv_transpose_node_users) == 1 and all([isinstance(value, gs.Constant) for value in node.inputs[1:]]):
conv_transpose_weight = conv_transpose_node.inputs[1].values
bn_node = node
bn_scale = bn_node.inputs[1].values
Expand Down

0 comments on commit 0e51815

Please sign in to comment.