Skip to content

A small library implementing magnitude-based pruning in PyTorch

License

Notifications You must be signed in to change notification settings

gfrogat/prunhild

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prunhild

prunhild is a small library for neural network pruning based on PyTorch.

I wrote this library for better structuring my code when replicating the experiments from The Lottery Ticket Hypothesis: Finding Sparse, Trainable Neural Networks for a university course.

The library currently only implements simple magnitude-based pruning as used in the previously mentioned paper. Througout the library magnitude-pruning is referred to as cutoff-pruning.

The library offers a simple class CutoffPruner which offers a similar interface as the Optimizer class from PyTorch. The Pruner class takes different strategies (Cutoffs) for computing the binary masks (prune-masks) used for pruning the weights.

Getting Started

Installation

You can install the library directly from GitHub:

# Install from GitHub
pip install git+https://github.com/gfrogat/prunhild

Examples

The folder examples contains an example using MNIST on how to use the library. If you encounter problems or have any questions don't hesitate to open an issue.

  • prunhild example on MNIST - code

About

A small library implementing magnitude-based pruning in PyTorch

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages