ReProduceByYQ / Channel_pruning_yq

This repo is re-produce for Channel_pruning
MIT License
11 stars 1 forks source link

Channel_pruning_yq

This repo is re-produce for Channel_pruning, Framework is Caffe.

The original source code :yihui-he.

Introduction

Two main function in my implementation :

Notice:

Now, it is only for native ConvNet such as VGG, not work for multi-branch ConvNet such as ResNet. I don`t implementation channel decompose ,because it is unhelpful in my test experiment!!!! So ,I have 2C not 3C.

File Intro
__channel_pruning_one_layer.py__ This is Channel Pruning reproduct,but only for pruning one layer, you should modify "prune_layer_name" in Line 49 for youself.
channel_pruning_reproduce.py Such as pruning layer "conv2_1", This file tell you how to implement step-by-step. Including Get Feature(), Lasso Regression(), Linear Regression(), Generator New Protobuf(), Generator New Weights()
low_rank_and_channel_pruning.py All funtion in here, such as Low Rank and Channel Pruning(layer-by-layer), It needs two configure file:config.json and __config_cratio.json__ , you can modify them in Line 45 and Line 49.
config.json It is for Low rank configuration, the number obtained from the experiment.
__config_cratio.json__ It is for Channel Pruning(layer-by-layer) configuration, the number means that how many channels will be keep.

Cite

@InProceedings{He_2017_ICCV,
author = {He, Yihui and Zhang, Xiangyu and Sun, Jian},
title = {Channel Pruning for Accelerating Very Deep Neural Networks},
booktitle = {The IEEE International Conference on Computer Vision (ICCV)},
month = {Oct},
year = {2017}
}

Todo