diff --git a/deploy/slim/prune/pruning_and_finetune.py b/deploy/slim/prune/pruning_and_finetune.py index 0a03cb449523232dbeedf1d7066b4ea4ba01f31f..bf54b79915591d6516798110bdf283ab36e060f6 100644 --- a/deploy/slim/prune/pruning_and_finetune.py +++ b/deploy/slim/prune/pruning_and_finetune.py @@ -92,7 +92,8 @@ def main(): sen = load_sensitivities("sensitivities_0.data") for i in skip_list: - sen.pop(i) + if i in sen.keys(): + sen.pop(i) back_bone_list = ['conv' + str(x) for x in range(1, 5)] for i in back_bone_list: for key in list(sen.keys()):