GithubHelp home page GithubHelp logo

diaoenmao / pruning-deep-neural-networks-from-a-sparsity-perspective Goto Github PK

View Code? Open in Web Editor NEW
19.0 2.0 2.0 33.16 MB

[ICLR 2023] Pruning Deep Neural Networks from a Sparsity Perspective

License: MIT License

Python 98.85% Shell 1.15%
model-compression neural-network-compression pruning sparsity deep-learning

pruning-deep-neural-networks-from-a-sparsity-perspective's Introduction

Pruning Deep Neural Networks from a Sparsity Perspective

[ICLR 2023] This is an implementation of Pruning Deep Neural Networks from a Sparsity Perspective

  • An illustration of our hypothesis on the relationship between sparsity and compressibility of neural networks.

Requirements

See requirements.txt

Instructions

  • Global hyperparameters are configured in config.yml
  • Use make.sh to generate run script
  • Use make.py to generate exp script
  • Use process.py to process exp results
  • Experimental setup are listed in make.py
  • Hyperparameters can be found at process_control() in utils.py

Examples

  • Run make_stats.py to prepare for each dataset
  • Train One Shot with FashionMNIST, Linear, $T=30$, 'Global Pruning', $P=0.2$
    python train_classifier.py --control_name FashionMNIST_linear_30_global_os-0.2
    
  • Test Lottery Ticket with CIFAR10, MLP, $T=30$, 'Layer-wise Pruning', $P=0.2$
    python train_classifier.py --control_name CIFAR10_mlp_30_layer_lt-0.2
    
  • Train SAP with CIFAR10, ResNet18, $T=15$, 'Neuron-wise Pruning', $p=0.5$, $q=1.0$, $\eta_r=0.001$, $\gamma=1.2$
    python train_classifier.py --control_name CIFAR10_resnet18_30_neuron_si-0.5-1.0-0.001-1.2
    

Results

  • Results of (a) retrained and (b) pruned models at each pruning iteration for 'Global Pruning' with CIFAR10 and ResNet18.

Acknowledgements

Enmao Diao
Ganghua Wang
Jiawei Zhang
Yuhong Yang
Jie Ding
Vahid Tarokh

pruning-deep-neural-networks-from-a-sparsity-perspective's People

Contributors

diaoenmao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.