This is the official implementation of the paper: "Layerwise Sparsity for Magnitude-based Pruning", ICLR 2021.
- The key file is the
tools/pruners.py
, where we implement various layerwise sparsity determination methods for the magnitude-based pruning. - Run
iterate.py
to run simulations. - This codebased only contains CIFAR-10 experiments in the paper. To add more experiments, you may want to add models to
tools/models/
, datasets totools/datasets/
andtools/dataloaders.py
, hyperparameter setups totools/modelloaders.py
.
Enjoy!
Best,
Authors.