From 2d07a0bcb9f4fe4e1d0f58f72efc8f9c5f0a7b08 Mon Sep 17 00:00:00 2001 From: yukavio Date: Wed, 23 Sep 2020 09:44:13 +0000 Subject: [PATCH] fix slim prune --- deploy/slim/prune/pruning_and_finetune.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deploy/slim/prune/pruning_and_finetune.py b/deploy/slim/prune/pruning_and_finetune.py index 0a03cb44..bf54b799 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()): -- GitLab