Skip to content
ENC: A fast network compression platform - Caffe Implementation
Python Shell C++ MATLAB
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

ENC: Efficient Neural Network Compression

"Efficient Neural Network Compression", CVPR 2019, by Hyeji Kim, Muhammad Umar Karim Khan, Chong-Min Kyung.
[Paper] [Supp] [Poster]

Overall Framework


ENC is the fast network compression platform

  • network decomposition based on truncated SVD
  • determination of the number of filters for each layer (convolutional, fully-connected)
  • reduction of convolution filters and fully-connected nodes

This repository contains

  • ./compress : proposed network compression methods
  • ./init : pre-processing scripts for a new network & network decomposition
  • ./base_models : caffemodel & prototxt files
  • ./caffe : modified caffe.cpp for Caffe framework

Download the Compressed Networks


  • Caffe
  • google.protobuf: sudo pip install google sudo pip install protobuf
  • python-tk: sudo apt-get install python-tk
  • scipy: sudo apt-get install libblas-dev sudo apt-get install liblapack-dev sudo pip install scipy
  • skimage: sudo apt-get install python-skimage
  • realpath: sudo apt-get realpath

Quick Start (ex. ResNet-56)

  1. copy caffe/caffe.cpp to ${your caffe home}/tools/. and rebuild :
cp caffe/caffe.cpp ${your caffe home}/tools/.
make -j20 all
make -j20 pycaffe
  1. modify the dataset path in below prototxt files :


  1. modify the symbolic link of caffe to ${your caffe home}/:

NOTE: symbolic link of caffe directory should be the absolute path. (ex. /home/hjkim/ENC/caffe/)

  1. set the constraints in
cd ./compress/ENC-Map/res56
vi # set variables:

TAR_COMP="{target complexity}" # which is (1-compression rate), range: 0.0 ~ 1.0, ex) 0.5
GPU_IDX="{avaiable gpu indice}" # ex) GPU_IDX="0" or GPU_IDX="0,2,3"
  1. run the script :

For VGG-16 Compression

Download [orig-vgg16] and [decomp-vgg16], then :

mv vgg16.caffemodel ./base_models/vgg16/vgg16.caffemodel # original vgg16
mv vgg16_svd_1.caffemodel ./init/decomp_init/vgg16/comp_vgg16/model/vgg16_svd_1.caffemodel # decomposed vgg16


  author={Hyeji Kim, Muhammad Umar Karim Khan, Chong-Min Kyung},
  title={Efficient Neural Network Compression},
  booktitle={The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
  month = {June},
  year = {2019},


Contact, Feel free to contact me. :-)

You can’t perform that action at this time.