We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 267a3f2 commit 874bba3Copy full SHA for 874bba3
paddleslim/analysis/flops.py
@@ -86,7 +86,7 @@ def _graph_flops(graph, only_conv=True, detail=False):
86
k_size = op.attr("ksize")
87
flops += h_out * w_out * c_out * (k_size[0]**2)
88
89
- elif op.type() == 'mul':
+ elif op.type() in ['mul', 'matmul', 'matmul_v2']:
90
x_shape = list(op.inputs("X")[0].shape())
91
y_shape = op.inputs("Y")[0].shape()
92
if x_shape[0] == -1:
0 commit comments