Code Monkey home page Code Monkey logo

kesi's Introduction

Gift from Iterative Network Pruning

This repository contains the code for reproducing the results for paper Paying more attention to Snapshot of Iterative Pruning: Improving Model Compression via Ensemble Distillation (BMVC 2020).

Summary

In short, the paper propose to leverage the snapshots of iterative pruning to construct ensembles and distilling knowledge from them. To stimulate the diversity between each snapshots, we use One-cycle schedule to retrain the pruned networks. Thus, each snapshot is encouraged to converge to different optimal solution.

The algorithm is summarized below:

  1. Train the baseline network to completion.
  2. Prune redundant weights (based on some criteria).
  3. Retrain with One-cycle learning rate.
  4. Repeat step 2 and 3 until desired compression ratio is reached.
  5. Distill knowledge from ensemble to desired network.

How to run

Please checkout example.pynb for detail instruction to reproduce the results on CIFAR. Instruction for running experiments on Tiny-Imagenet might be updated later.

We also provided the scripts for repeative pruning and knowledge distillation (read Sec.5 in Colab example). Disclamer: you might have to modify the checkpoint_paths variable in ensemble_finetune.py to appropriate paths (and by that I mean cifar/filter_pruning/ensemble_finetune.py, cifar/weight_pruning/ensemble_finetune.py,... depending on your chosen method/dataset).

Results

CIFAR-10 and CIFAR-100.

Results on CIFAR

Tiny-Imagenet

Results on Tiny-Imagenet

PFEC and MWP stand for Pruning Filters for Efficient ConvNets and Learning both Weights and Connections for Efficient Neural Networks respectively.

Acknowledgement

The code is mostly taken from Eric-mingjie's repository

kesi's People

Contributors

lehduong avatar votnhan avatar

Watchers

James Cloos 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.