PolarizationPruning
Implementation of Neuron-level Structured Pruning using Polarization Regularizer
Install / Use
/learn @polarizationpruning/PolarizationPruningREADME
Neuron-level Structured Pruning using Polarization Regularizer
NeurIPS 2020 [Paper]
Introduction
Pipeline:
- Sparsity Training
- Pruning
- 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.
Related Skills
node-connect
351.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
