Skip to content
View polarizationpruning's full-sized avatar
Block or Report

Block or report polarizationpruning

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse

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.

Popular repositories

  1. PolarizationPruning PolarizationPruning Public

    Implementation of Neuron-level Structured Pruning using Polarization Regularizer

    Python 80 13