Home

Awesome

PyTorch Implementation of CURL

Requirements

PyTorch environment:

Prune on ImageNet

  1. clone this repository.
  2. download the ImageNet dataset and organize this dataset with train and val folders.
  3. select subfolder:
    cd ImageNet/CURL
    
  4. start pruning and fine-tuning:
    ./run_this.sh
    

Note: The training log files on ImageNet are missing. We provide the pruned model: ImageNet/released_model/ResNet50-CURL-1G.pth. You can run ImageNet/released_model/run_this.sh to test its accuracy.

Prune on CUB200

  1. clone this repository.
  2. download the CUB200 dataset and organize this dataset with train and val folders.
  3. expand the small dataset using CUB200/expand_dataset.py
  4. select subfolder:
    cd CUB200/mobilenetv2/
    
  5. edit the configuration file config.yaml.
  6. calculate the importance score for each filter:
    ./evaluate_importance.sh
    
  7. fine-tune the pruned model:
    ./run_this.sh
    

Note: The training log files are provided in corresponding folders.

Results

We prune the ResNet50 on ImageNet dataset:

ArchitectureTop-1 Acc.Top-5 Acc.#MACs#Param.
ResNet-5076.15%92.87%4.09G25.56M
CURL73.39%91.46%1.11G6.67M

The results of MobileNetV2 on CUB200:

ArchitectureTop-1 Acc.#MACs
MobileNetV2-1.078.77%299.77M
MobileNetV2-0.573.96%96.12M
CURL78.72%96.07M

The results of ResNet50 on CUB200:

ArchitectureTop-1 Acc.#MACs
ResNet5084.76%4.09G
ResNet50-CURL81.33%1.11G
CURL83.64%1.10G

Citation

If you find this work is useful for your research, please cite:

@InProceedings{Luo_2020_CVPR,
author = {Luo, Jian-Hao and Wu, Jianxin},
title = {Neural Network Pruning With Residual-Connections and Limited-Data},
booktitle = {The IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2020},
pages = {1458-1467}
}

Contact

Feel free to contact me if you have any question (Jian-Hao Luo luojh@lamda.nju.edu.cn or jianhao920@gmail.com).