Giter Site home page Giter Site logo

mil-ad / snip Goto Github PK

View Code? Open in Web Editor NEW
100.0 2.0 15.0 25 KB

Pytorch implementation of the paper "SNIP: Single-shot Network Pruning based on Connection Sensitivity" by Lee et al.

License: MIT License

Makefile 1.39% Python 98.61%
pytorch-cnn pruning mnist-classification cifar10

snip's Introduction

SNIP: Single-shot network pruning based on connection sensitivity

This is an unofficial PyTorch implementation of the paper SNIP: Single-shot Network Pruning based on Connection Sensitivity by Namhoon Lee, Thalaiyasingam Ajanthan and Philip H. S. Torr.

It doesn not cover all the experiment in the paper but it does include the main ones:

  • LeNet5-Caffe on MNIST
  • VGG-D on CIFAR-10

I haven't had the time to add an argparser yet the network type and pruning level should be changed directly in the code.

Environment

This has been tested with Python 3.7.1 and PyTorch 1.0.0. The exact environment can be replicated by:

$ conda env create -f environment.yml

This would create a conda environment called snip-env.

Usage

$ conda activate snip-env
$ python train.py

Results

Three runs with different seeds with LeNet5-Caffe on MNIST (sparsity level of 98%):

Results with LeNet5-Caffe - Sparsity 9%

Two runs with different seeds with VGG-D on CIFAR-10 (sparsity level of 95%):

Results with VGG-D - Sparsity 95%

snip's People

Contributors

mil-ad avatar

Stargazers

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

Watchers

 avatar  avatar

snip's Issues

code problem

Thank for you great work! will you release the code adjusting the snip to resnet?

dose weights real pruned?

Hi!
weights and its gradients are set to 0 in the code which i think is different from real pruning.

model weight

Hello, my research direction is neural network hardware accelerators. I need model parameters to test. Do you have well-trained models, such as vgg, LeNet, AlexNet, etc. Any network model is fine, I need more models to test, please send me an email, [email protected], thank you very much.

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.