Code Monkey home page Code Monkey logo

vibnet's Introduction

VIBNet

This repository provides codes to reproduce the major experiments in the paper Compressing Neural Networks using the Variational Information Bottleneck, (ICML 2018).

If you find this code useful in your research you could cite

@inproceedings{dai2018vib,
    title={Compressing Neural Networks using the Variational Information Bottleneck},
    author={Dai, Bin and Zhu, Chen and Guo, Baining and Wipf, David},
    booktitle={Proceedings of the 35th International Conference on Machine Learning (ICML 2018)},
    year={2018}
}

Prerequisites

The experiments can be reproduced with PyTorch 0.3.1 and CUDA 9.0 on Ubuntu 16.04. Here is one approach to set up:

  1. Install Anaconda2 (optional).
mkdir tmp && cd tmp
wget https://repo.anaconda.com/archive/Anaconda2-5.1.0-Linux-x86_64.sh && bash Anaconda2-5.1.0-Linux-x86_64.sh
  1. Install PyTorch.
# Select the correct version according to your environment. 
pip install http://download.pytorch.org/whl/cu90/torch-0.3.1-cp27-cp27mu-linux_x86_64.whl
pip install torchvision 
  1. Install TensorboardX for visualization.
pip install tensorboardx
  1. Download the pretrained VGG models and unzip under this directory via Google Drive or Baidu Pan.

Run

Tabel 3 part 1

python ib_vgg_train.py --gpu 0 --batch-norm --resume-vgg-pt baseline/cifar10/checkpoint_299_nocrop.tar --ban-crop --opt adam --cfg D4 --epochs 300 --lr 1.4e-3 --weight-decay 5e-5 --kl-fac 1.4e-5 --save-dir ib_vgg_chk/D4

Table 3 part 2

python ib_vgg_train.py --data-set cifar10 --gpu 0 --batch-norm --resume-vgg-vib baseline/cifar10/D6_600/last_epoch.pth --opt adam --cfg D6 --epochs 300 --lr 1e-3 --weight-decay 5e-5 --kl-fac 3e-5 --save-dir ib_vgg_chk/D6_600

Table 3 part 3

python ib_vgg_train.py --data-set cifar10 --gpu 0 --batch-norm --resume-vgg-vib baseline/cifar10/G5_400/last_epoch.pth --opt adam --cfg G5 --epochs 300 --lr 1e-3 --weight-decay 5E-5 --kl-fac 1e-5 --save-dir ib_vgg_chk/G5-400

Table 4 part 1

python ib_vgg_train.py --data-set cifar100 --gpu 0 --batch-norm --resume-vgg-vib baseline/cifar100/vgg-cifar100-pretrain.pth --opt adam --cfg G --epochs 300 --lr 1e-3 --weight-decay 1.2e-4 --kl-fac 1e-5 --ban-crop --ban-flip --save-dir ib_vgg_chk/cifar100-G

Table 4 part 2

python ib_vgg_train.py --data-set cifar100 --gpu 0 --batch-norm --resume-vgg-vib baseline/cifar100/crop_300/last_epoch.pth --opt adam --cfg G5 --epochs 300 --lr 1e-3 --weight-decay 5E-5 --kl-fac 1.5e-5 --save-dir ib_vgg_chk/cifar100-crop-300

vibnet's People

Contributors

zhuchen03 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.