From 5b3bd165b884fe7f3ce6551d7dbf0a4c8dc1dacd Mon Sep 17 00:00:00 2001 From: lijianshe02 <48898730+lijianshe02@users.noreply.github.com> Date: Thu, 23 Apr 2020 11:41:50 +0800 Subject: [PATCH] fix fpgm prune criterion bug test=develop (#234) --- paddleslim/prune/criterion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddleslim/prune/criterion.py b/paddleslim/prune/criterion.py index 5f1f78c1..e224930f 100644 --- a/paddleslim/prune/criterion.py +++ b/paddleslim/prune/criterion.py @@ -63,7 +63,7 @@ def geometry_median(group, graph): x = w.repeat(channel_num, axis=0) y = np.zeros_like(x) for i in range(channel_num): - y[i * channel_num:(i + 1) * channel_num] = np.tile(channel_num, + y[i * channel_num:(i + 1) * channel_num] = np.tile(w[i], (channel_num, 1)) tmp = np.sqrt(np.sum((x - y)**2, -1)) tmp = tmp.reshape((channel_num, channel_num)) -- GitLab