Skip to content

weitaoatvison/Channel_pruning_yq

 
 

Repository files navigation

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

  • support VGG
  • Combination of Conv layer and BN layer
  • support ResNet
  • support Faster RCNN

About

This repo is re-produce for Channel_pruning

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%