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 43f43c6 commit 25f8907Copy full SHA for 25f8907
paddleslim/dygraph/prune/filter_pruner.py
@@ -265,7 +265,7 @@ def _cal_sensitive(self,
265
baseline = eval_func()
266
plan = self.prune_var(var_name, dims, ratio)
267
pruned_metric = eval_func()
268
- loss = (baseline - pruned_metric) / baseline + 1e-3
+ loss = (baseline - pruned_metric) / (baseline + 1e-3)
269
_logger.info("pruned param: {}; {}; loss={}".format(
270
var_name, ratio, loss))
271
sensitivities[var_name][ratio] = loss
0 commit comments