/CHIP_NeurIPS2021

Code for CHIP: CHannel Independence-based Pruning for Compact Neural Networks (NeruIPS 2021).

Primary LanguagePython

In Progress

CHIP: CHannel Independence-based Pruning for Compact Neural Networks

Usage

Generate Feature Maps.

python calculate_feature_maps.py \
--arch resnet_56 \
--dataset cifar10 \
--data_dir ./data \
--pretrain_dir ./pretrain_model/resnet_56.pt \
--gpu 0

Generate Channel Independence (CI).

python calculate_ci.py \
--arch resnet_56

Prune and Fine-tune Models.

1. CIFAR-10
python prune_finetune_cifar.py \
--data_dir ./data \
--result_dir ./result/resnet_56/1 \
--arch resnet_56 \
--ci_dir ./CI_resnet_56 \
--batch_size 256 \
--epochs 200 \
--lr_type cos \
--learning_rate 0.01 \
--momentum 0.99 \
--weight_decay 0.001 \
--pretrain_dir ./pretrain_model/resnet_56.pt \
--sparsity [0.]+[0.4]*2+[0.5]*9+[0.6]*9+[0.7]*9 \
--gpu 0
2. ImageNet
python prune_finetune_imagenet.py \
--data_dir ./imagenet \
--result_dir ./result/resnet_50/1 \
--arch resnet_50 \
--ci_dir ./CI_resnet_50 \
--batch_size 256 \
--epochs 200 \
--lr_type cos \
--learning_rate 0.01 \
--momentum 0.99 \
--weight_decay 0.001 \
--pretrain_dir ./pretrain_model/resnet_50.pt \
--sparsity [xx] \
--gpu 0

Results

CIFAR-10

TBD.

ImageNet

TBD.

Others

Some codes are based on link.

Citation

TBD.