From 874bba39a2b0e44b74b16b310d442d5658fd9c3e Mon Sep 17 00:00:00 2001 From: Guanghua Yu <742925032@qq.com> Date: Mon, 17 Apr 2023 17:33:35 +0800 Subject: [PATCH] Update flops.py --- paddleslim/analysis/flops.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddleslim/analysis/flops.py b/paddleslim/analysis/flops.py index 7b8570e8..04756313 100644 --- a/paddleslim/analysis/flops.py +++ b/paddleslim/analysis/flops.py @@ -86,7 +86,7 @@ def _graph_flops(graph, only_conv=True, detail=False): k_size = op.attr("ksize") flops += h_out * w_out * c_out * (k_size[0]**2) - elif op.type() == 'mul': + elif op.type() in ['mul', 'matmul', 'matmul_v2']: x_shape = list(op.inputs("X")[0].shape()) y_shape = op.inputs("Y")[0].shape() if x_shape[0] == -1: -- GitLab