Giter VIP home page Giter VIP logo

Neuron-level Structured Pruning using Polarization Regularizer

NeurIPS 2020 [Paper]

Introduction

Pipeline:

  1. Sparsity Training
  2. Pruning
  3. Fine-tuning

Running

We test our code on Python 3.6. Our code is incompatible with Python 2.x.

Install packages:

pip install -r requirements.txt

We recommend to run the code on PyTorch 1.2 and CUDA 10.0. The project is incompatible with PyTorch <= 1.0.

See README in ./imagenet or ./cifar for guidelines on running experiments on ImageNet (ILSVRC-12) or CIFAR10/100 datasets.

We upload the the pruned checkpoints on OneDrive.

Note

Pruning strategy

We introduce a novel pruning method in our paper (Fig. 2). We have implemented multiple pruning methods in our code (option --pruning-strategy).

  • grad: The method introduced in our paper (Section 3.3).
  • fixed: Use a global pruning threshold for all layers (0.01 as default).
  • percent: Determine the threshold by a global pruning percent (as Network Slimming).
  • search: Deprecated. Not recommend to use.

Loss Type

  • original: There is no any sparse regularization on the loss function, i.e., baseline model.
  • sr: Apply L1 regularization on the scaling factors, i.e., Network Slimming.
  • zol: Polarization regularization. See equation 2 in the paper.

Acknowledgement

We build our code based on rethinking-network-pruning. We'd like to thank their contribution to the research on structured pruning.

polarizationpruning's Projects

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.