未验证 提交 ac10acf0 编写于 作者: W whs 提交者: GitHub

Skip empty group while pruning. (#236)

上级 f3fcd836
...@@ -91,6 +91,8 @@ class Pruner(): ...@@ -91,6 +91,8 @@ class Pruner():
pruned_params = [] pruned_params = []
for param, ratio in zip(params, ratios): for param, ratio in zip(params, ratios):
group = collect_convs([param], graph, visited)[0] # [(name, axis)] group = collect_convs([param], graph, visited)[0] # [(name, axis)]
if group is None or len(group) == 0:
continue
if only_graph and self.idx_selector.__name__ == "default_idx_selector": if only_graph and self.idx_selector.__name__ == "default_idx_selector":
param_v = graph.var(param) param_v = graph.var(param)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册