From 61fab0d05f2fb974f9a6504bc3bf8388743ba766 Mon Sep 17 00:00:00 2001 From: Neta Zmora <31280975+nzmora@users.noreply.github.com> Date: Fri, 23 Aug 2019 17:04:19 +0300 Subject: [PATCH] ranked_structures_pruner.py issue #363 When adding support for specifying the rounding function for pruning structures, the code of `ActivationRankedFilterPruner` was updated incorrectly (adding an extra argument). This code is not covered by any of the tests and therefore the bug was not caught in time. To do: add unit test. --- distiller/pruning/ranked_structures_pruner.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/distiller/pruning/ranked_structures_pruner.py b/distiller/pruning/ranked_structures_pruner.py index 56454e7..96b8dce 100755 --- a/distiller/pruning/ranked_structures_pruner.py +++ b/distiller/pruning/ranked_structures_pruner.py @@ -446,8 +446,7 @@ class ActivationRankedFilterPruner(_RankedStructureParameterPruner): if fraction_to_prune == 0: return binary_map = self.rank_and_prune_filters(fraction_to_prune, param, param_name, - zeros_mask_dict, model, binary_map, - self.rounding_fn) + zeros_mask_dict, model, binary_map) return binary_map def rank_and_prune_filters(self, fraction_to_prune, param, param_name, zeros_mask_dict, model, binary_map=None): -- GitLab