Coder Social home page Coder Social logo

pawan-ks / chipnet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aryanraj315/chipnet

0.0 0.0 0.0 825 KB

Official implementation "ChipNet: Budget-Aware Pruning with Heaviside Continuous Approximations"

License: MIT License

Python 98.81% Shell 1.19%

chipnet's Introduction

ChipNet

This is the official repository to the ICLR 2021 paper "ChipNet: Budget-Aware Pruning with Heaviside Continuous Approximations" by Rishabh Tiwari, Udbhav Bamba, Arnav Chavan, Deepak Gupta.

Getting Started

You will need Python 3.7 and the packages specified in requirements.txt. We recommend setting up a virtual environment with pip and installing the packages there.

Install packages with:

$ pip install -r requirements.txt

Configure and Run

All configurations concerning data, model, training, etc. can be called using commandline arguments.

The main script offers many options; here are the most important ones:

Pretraining

usage: python pretraining.py [dataset] [model name] --epochs [number of epochs] --decay [weight decay] --batch_size [batch size] --lr [learning rate] --scheduler_type {1, 2}

Pruning

usage: python pruning.py [dataset] [model name] --Vc {float value between 0-1} --budget_type {channel_ratio, volume_ratio, parameter_ratio, flops_ratio} --epochs 20

Finetuning

usage: python finetuning.py [dataset] [model name] --Vc {float value between 0-1} --budget_type {channel_ratio, volume_ratio, parameter_ratio, flops_ratio} --name {model name}_{dataset}_{budget}_{budget_type} --epochs [number of epochs] --decay [weight decay] --batch_size [batch size] --lr [learning rate] --scheduler_type {1, 2}

Mask Transfer

usage: python finetuning.py [dataset] [model name] --Vc {float value between 0-1} --budget_type {channel_ratio, volume_ratio, parameter_ratio, flops_ratio} --host_name {model name}_{dataset}_{budget}_{budget_type} --epochs [number of epochs] --decay [weight decay] --batch_size [batch size] --lr [learning rate] --scheduler_type {1, 2}
  • Parameter and FLOPs budget is supported only with models using ResNetCifar module for now.

Citation

Please cite our paper in your publications if it helps your research. Even if it does not,and you want to make us happy, do cite it :)

@inproceedings{
tiwari2021chipnet,
title={ChipNet: Budget-Aware Pruning with Heaviside Continuous Approximations},
author={Rishabh Tiwari and Udbhav Bamba and Arnav Chavan and Deepak Gupta},
booktitle={International Conference on Learning Representations},
year={2021},
url={https://openreview.net/forum?id=xCxXwTzx4L1}
}

License

This project is licensed under the MIT License.

chipnet's People

Contributors

arnav0400 avatar aryanraj315 avatar pawan-ks avatar rishabh-16 avatar ubamba98 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.