Network Slimming This repository contains the code for the following paper Learning Efficient Convolutional Networks through Network Slimming (ICCV 2017). Zhuang Liu, Jianguo Li, Zhiqiang Shen, Gao Huang, Shoumeng Yan, Changshui Zhang. We have now released another [[PyTorch implementation]]( which supports ResNet and DenseNet, based on Qiang Wang's Pytorch implementation listed below. Other Implementations: [[Pytorch]]( by Qiang Wang. [[Pytorch hand detection using YOLOv3]]( by Lam1360. [[Pytorch object detection using YOLOv3]]( by talebolano. Citation: Introduction Network Slimming is a neural network
training scheme that can simultaneously reduce the model size, run-time memory, computing operations, while introducing no accuracy loss to and minimum overhead to the training process. The resulting models require no special libraries/hardware for efficient inference. Approach Figure 1: The channel pruning process. We associate a scaling factor (reused from batch normalization layers) with each channel in convolutional layers. Sparsity regularization is imposed on these scaling factors during training to automatically identify unimportant channels. The channels with small
scaling factor values (in orange color) will be pruned (left side). After pruning, we obtain compact models (right side), which are then fine-tuned to achieve comparable (or even higher) accuracy as normally trained full network. Figure 2: Flow-chart of the network slimming procedure. The dotted line is for the multi-pass version of the procedure. Example Usage This repo holds the example code for VGGNet on CIFAR-10 dataset. Prepare the directories to save the results 1. Train
vgg network with channel level sparsity, S is the lambda in the paper which controls the significance of sparsity 2. Identify a certain percentage of relatively unimportant channels and set their scaling factors to 0 3. Re-build a real compact network and copy the weights from the model in the last stage 4. Fine-tune the compact network Note The original paper has a bug on the VGG results on ImageNet (Table 2). Please refer to this [[issue]]( The
correct result was presented in Table 4 of this paper.
Frequently asked questions
How many stars and forks are recorded?
liuzhuang13/slimming has 577 stars and 75 forks.
What is the repository rank?
liuzhuang13/slimming is ranked 16,696.
What language and category are recorded?
liuzhuang13/slimming has 577 stars, uses Lua and belongs to Infrastructure.
Which repository is closest in rank?
liuzhuang13/slimming is compared with microsoft/psi, ranked 16,697 with 577 stars.
README
Network Slimming
This repository contains the code for the following paper
@inproceedings{Liu2017learning,
title = {Learning Efficient Convolutional Networks through Network Slimming},
author = {Liu, Zhuang and Li, Jianguo and Shen, Zhiqiang and Huang, Gao and Yan, Shoumeng and Zhang, Changshui},
booktitle = {ICCV},
year = {2017}
}
Introduction
Network Slimming is a neural network training scheme that can simultaneously reduce the model size, run-time memory, computing operations, while introducing no accuracy loss to and minimum overhead to the training process. The resulting models require no special libraries/hardware for efficient inference.
Approach
Figure 1:
The channel pruning process.
We associate a scaling factor (reused from batch normalization layers) with each channel in convolutional layers. Sparsity
regularization is imposed on these scaling factors during training to automatically identify unimportant channels. The channels with small
scaling factor values (in orange color) will be pruned (left side). After pruning, we obtain compact models (right side), which are then
fine-tuned to achieve comparable (or even higher) accuracy as normally trained full network.
Figure 2: Flow-chart of the network slimming procedure. The dotted line is for the multi-pass version of the procedure.
Example Usage
This repo holds the example code for VGGNet on CIFAR-10 dataset.
The original paper has a bug on the VGG results on ImageNet (Table 2). Please refer to this [issue]. The correct result was presented in Table 4 of this paper.