Skip to content

Commit 874bba3

Browse files
authored
Update flops.py
1 parent 267a3f2 commit 874bba3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

paddleslim/analysis/flops.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def _graph_flops(graph, only_conv=True, detail=False):
8686
k_size = op.attr("ksize")
8787
flops += h_out * w_out * c_out * (k_size[0]**2)
8888

89-
elif op.type() == 'mul':
89+
elif op.type() in ['mul', 'matmul', 'matmul_v2']:
9090
x_shape = list(op.inputs("X")[0].shape())
9191
y_shape = op.inputs("Y")[0].shape()
9292
if x_shape[0] == -1:

0 commit comments

Comments
 (0)