← 开源
ethanhe42

channel-pruning

Channel Pruning for Accelerating Very Deep Neural Networks (ICCV'17)

InfrastructureModel optimizationPython
在 GitHub 打开
增长势头
+024 小时新增 Star0.0%
1.09k
Star
306
Fork
+0
本周
2
贡献者
创建于 2017-08-21 · 更新于 2026-10-06 · 今日第 11666 名
主要开发者
ethanhe42Betterthinking

ethanhe42/channel-pruning 排名第 11,666,有 1,088 个星标。

同类别比较

ethanhe42/channel-pruning 排名第 11,666,此处有 8 个同类条目;kubernetes-retired/kube-batch 排名第 11,649。

同类别比较
名称排名指标
welltop-cn/ComfyUI-TeaCache11,622
语言:
Python
星标数:
1,097
分叉数:
64
openai/codex-universal11,631
语言:
Dockerfile
星标数:
1,095
分叉数:
281
简介:
Base docker image used in Codex environments
VoAPI/VoAPI11,644
语言:
Go
星标数:
1,092
分叉数:
128
简介:
🎉 全新下一代高颜值、高性能、高扩展的智能AI大模型API聚合分发系统 | A new next-generation high-value, high-performance, and highly scalable intelligent AI large-model API aggregation and distribution
kubernetes-retired/kube-batch11,649
语言:
Go
星标数:
1,091
分叉数:
258
简介:
A batch scheduler of kubernetes for high performance workload, e.g. AI/ML, BigData, HPC
Xilinx/finn11,688
语言:
Python
星标数:
1,084
分叉数:
308
简介:
Dataflow compiler for QNN inference on FPGAs
weiesky/cc-viewer11,703
语言:
JavaScript
星标数:
1,082
分叉数:
123
简介:
A request monitoring system for Claude Code that captures and visualizes all API requests and responses in real time. Helps developers monitor their Context for reviewing and debugging during Vibe Coding.
Stonesjtu/pytorch_memlab11,716
语言:
Python
星标数:
1,079
分叉数:
39
简介:
Profiling and inspecting memory in pytorch
meta-pytorch/monarch11,717
语言:
Rust
星标数:
1,079
分叉数:
176
简介:
PyTorch Single Controller
关键参数与规格
关键参数与规格
参数值
语言Python
类别Infrastructure
子类别Model optimization
星标数1,088
分叉数306
贡献者2
创建日期2017-08-21
更新日期2026-10-06
1 天星标数0
7 天星标数0
排名11,666
上次排名11,593
排名变化-73
7 天星标排名13,093
上次 7 天星标排名13,115
7 天星标排名变化22
总星标排名10,443
上次总星标排名10,428
总星标排名变化-15
国家USA
README 摘录

Channel Pruning for Accelerating Very Deep Neural Networks GitHub - yihui-he/channel-pruning: Channel Pruning for Accelerating Very Deep Neural Networks (ICCV'17) Channel Pruning for Accelerating Very Deep Neural Networks **ICCV 2017**, by Yihui He, Xiangyu Zhang and Jian Sun Please have a look our new works on compressing deep models: AMC: AutoML for Model Compression and Acceleration on Mobile Devices **ECCV’18**, which combines channel pruning and reinforcement learning to further accelerate CNN. AddressNet: Shift-Based Primitives for

Efficient Convolutional Neural Networks **WACV’19**. We propose a family of efficient networks based on Shift operation. MoBiNet: A Mobile Binary Network for Image Classification **WACV’20** Binarized MobileNets. 95) | 3C method combined spatial decomposition (Speeding up Convolutional Neural Networks with Low Rank Expansions) and channel decomposition (Accelerating Very Deep Convolutional Networks for Classification and Detection) (mentioned in 4. 2) Citation If you find the code useful in your research, please consider citing: requirements 1. Python3 packages you might not

have: , , , use to install. For finetuning with 128 batch size, 4 GPUs (~11G of memory) Installation (sufficient for the demo) 1. Build my Caffe fork (which support bicubic interpolation and resizing image shorter side to 256 then crop to 224x224) 3. Download ImageNet classification dataset 4. Specify imagenet path in (line 12 and 36) Channel Pruning *For fast testing, you can directly download pruned model. Download the original VGG-16 model move it to (or create a softlink instead) 1

. Combine some factorized layers for further compression, and calculate the acceleration ratio. Replace the ImageData layer of with ’s]( 3. Testing Test with: Pruning faster RCNN For fast testing, you can directly download pruned model from release Or you can: 1. use the pruned models from this repo to train faster RCNN 2X, 4X, solver prototxts are in FAQ You can find answers of some commonly asked questions in our Github wiki, or just create a new issue

常见问题

记录了多少星标和分叉?

ethanhe42/channel-pruning 有 1,088 个星标和 306 个分叉。

仓库排名是多少?

ethanhe42/channel-pruning 排名第 11,666。

记录的语言和类别是什么?

ethanhe42/channel-pruning 有 1,088 个星标,语言为 Python,类别为 Infrastructure。

哪个仓库排名最接近?

ethanhe42/channel-pruning 与 kubernetes-retired/kube-batch 比较,后者排名第 11,649,有 1,091 个星标。

README

Channel Pruning for Accelerating Very Deep Neural Networks

GitHub - yihui-he/channel-pruning: Channel Pruning for Accelerating Very Deep Neural Networks (ICCV'17)

Channel Pruning for Accelerating Very Deep Neural Networks

ICCV 2017, by Yihui He, Xiangyu Zhang and Jian Sun

Please have a look our new works on compressing deep models:

In this repository, we released code for the following models:

model Speed-up Accuracy
https://github.com/yihui-he/channel-pruning/releases/tag/channel_pruning_5x 5x 88.1 (Top-5), 67.8 (Top-1)
https://github.com/yihui-he/channel-pruning/releases/tag/VGG-16_3C4x 4x 89.9 (Top-5), 70.6 (Top-1)
https://github.com/yihui-he/channel-pruning/releases/tag/ResNet-50-2X 2x 90.8 (Top-5), 72.3 (Top-1)
https://github.com/yihui-he/channel-pruning/releases/tag/faster-RCNN-2X4X 2x 36.7 (AP@.50:.05:.95)
https://github.com/yihui-he/channel-pruning/releases/tag/faster-RCNN-2X4X 4x 35.1 (AP@.50:.05:.95)

3C method combined spatial decomposition (Speeding up Convolutional Neural Networks with Low Rank Expansions) and channel decomposition (Accelerating Very Deep Convolutional Networks for Classification and Detection) (mentioned in 4.1.2)

Citation

If you find the code useful in your research, please consider citing:

@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}
}

requirements

  1. Python3 packages you might not have: scipy, sklearn, easydict, use sudo pip3 install to install.
  2. For finetuning with 128 batch size, 4 GPUs (~11G of memory)

Installation (sufficient for the demo)

  1. Clone the repository

    # Make sure to clone with --recursive
     git clone --recursive https://github.com/yihui-he/channel-pruning.git
    
  2. Build my Caffe fork (which support bicubic interpolation and resizing image shorter side to 256 then crop to 224x224)

    cd caffe
    
     # If you're experienced with Caffe and have all of the requirements installed, then simply do:
     make all -j8 && make pycaffe
     # Or follow the Caffe installation instructions here:
     # http://caffe.berkeleyvision.org/installation.html
    
     # you might need to add pycaffe to PYTHONPATH, if you've already had a caffe before
    
  3. Download ImageNet classification dataset http://www.image-net.org/download-images

  4. Specify imagenet source path in temp/vgg.prototxt (line 12 and 36)

Channel Pruning

For fast testing, you can directly download pruned model. See next section 1. Download the original VGG-16 model http://www.robots.ox.ac.uk/~vgg/software/very_deep/caffe/VGG_ILSVRC_16_layers.caffemodel move it to temp/vgg.caffemodel (or create a softlink instead)

  1. Start Channel Pruning

    python3 train.py -action c3 -caffe [GPU0]
     # or log it with ./run.sh python3 train.py -action c3 -caffe [GPU0]
     # replace [GPU0] with actual GPU device like 0,1 or 2
    
  2. Combine some factorized layers for further compression, and calculate the acceleration ratio. Replace the ImageData layer of temp/cb_3c_3C4x_mem_bn_vgg.prototxt with [temp/vgg.prototxt’s](https://github.com/yihui-he/channel-pruning/blob/master/temp/vgg.prototxt#L1-L49) Shell ./combine.sh | xargs ./calflop.sh

  3. Finetuning

    caffe train -solver temp/solver.prototxt -weights temp/cb_3c_vgg.caffemodel -gpu [GPU0,GPU1,GPU2,GPU3]
     # replace [GPU0,GPU1,GPU2,GPU3] with actual GPU device like 0,1,2,3
    
  4. Testing

    Though testing is done while finetuning, you can test anytime with:

    caffe test -model path/to/prototxt -weights path/to/caffemodel -iterations 5000 -gpu [GPU0]
     # replace [GPU0] with actual GPU device like 0,1 or 2
    

    Pruned models (for download)

    For fast testing, you can directly download pruned model from release: VGG-16 3C 4X, VGG-16 5X, ResNet-50 2X. Or follow Baidu Yun Download link

Test with:

caffe test -model channel_pruning_VGG-16_3C4x.prototxt -weights channel_pruning_VGG-16_3C4x.caffemodel -iterations 5000 -gpu [GPU0]
# replace [GPU0] with actual GPU device like 0,1 or 2

Pruning faster RCNN

For fast testing, you can directly download pruned model from release Or you can: 1. clone my py-faster-rcnn repo: https://github.com/yihui-he/py-faster-rcnn 2. use the pruned models from this repo to train faster RCNN 2X, 4X, solver prototxts are in https://github.com/yihui-he/py-faster-rcnn/tree/master/models/pascal_voc

FAQ

You can find answers of some commonly asked questions in our Github wiki, or just create a new issue

排名相邻
同类项目