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

1. Enable GC strategy in run.sh (#2063)

2. Fix loading checkpoint in filter pruning strategy by adding init_model option into config file.
上级 be73423f
...@@ -20,6 +20,7 @@ strategies: ...@@ -20,6 +20,7 @@ strategies:
metric_name: 'acc_top1' metric_name: 'acc_top1'
compressor: compressor:
epoch: 200 epoch: 200
#init_model: './checkpoints/0' # Please enable this option for loading checkpoint.
checkpoint_path: './checkpoints/' checkpoint_path: './checkpoints/'
strategies: strategies:
- sensitive_pruning_strategy - sensitive_pruning_strategy
...@@ -16,6 +16,7 @@ strategies: ...@@ -16,6 +16,7 @@ strategies:
metric_name: 'acc_top1' metric_name: 'acc_top1'
compressor: compressor:
epoch: 200 epoch: 200
#init_model: './checkpoints/0' # Please enable this option for loading checkpoint.
checkpoint_path: './checkpoints/' checkpoint_path: './checkpoints/'
strategies: strategies:
- uniform_pruning_strategy - uniform_pruning_strategy
...@@ -30,6 +30,7 @@ strategies: ...@@ -30,6 +30,7 @@ strategies:
activation_quantize_type: 'abs_max' activation_quantize_type: 'abs_max'
compressor: compressor:
epoch: 142 epoch: 142
#init_model: './checkpoints/0' # Please enable this option for loading checkpoint.
checkpoint_path: './checkpoints/' checkpoint_path: './checkpoints/'
strategies: strategies:
- uniform_pruning_strategy - uniform_pruning_strategy
......
...@@ -24,6 +24,10 @@ fi ...@@ -24,6 +24,10 @@ fi
cd - cd -
# enable GC strategy
export FLAGS_fast_eager_deletion_mode=1
export FLAGS_eager_delete_tensor_gb=0.0
# for distillation # for distillation
#----------------- #-----------------
export CUDA_VISIBLE_DEVICES=0,1,2,3 export CUDA_VISIBLE_DEVICES=0,1,2,3
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册