Skip to content

Official code for the paper - Is Complexity Required for Neural Network Pruning? A Case Study on Global Magnitude Pruning

License

Notifications You must be signed in to change notification settings

manasgupta-1/GlobalMP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Is Complexity Required for Neural Network Pruning? A Case Study on Global Magnitude Pruning

This GitHub repository is the official repository for the paper "Is Complexity Required for Neural Network Pruning? A Case Study on Global Magnitude Pruning".

Set Up

  1. Clone this repository.
  2. Using Python 3.6.9, create a virtual environment venv with python -m venv myenv and run source myenv/bin/activate.
  3. Install requirements with pip install -r requirements.txt for venv.
  4. Create a folder which has LabelSmoothing.py, prune.py (or prune_withMT.py), model_list.py, and the base model.

Training with Global MP and Global MP with MT

To run the global magnitude pruning without minimum threshold (MT), run the prune.py file. To run the global magnitude pruning with MT, run the prune_withMT.py file.

Note - you should change the base model's location and the dataset's location in the the prune.py and prune_withMT.py files before running them.

To run the prune.py file, run the command-

python3 prune.py

To run the prune_withMT.py file, run the command-

python3 prune_withMT.py

Dense Model:

This model is the base model that we used for our ResNet-50 on ImageNet experiments.

Architecture Parameters Sparsity (%) Top-1 Acc (%) Model Links
Resnet-50 25.50M 0.00 77.04 Base Model

About

Official code for the paper - Is Complexity Required for Neural Network Pruning? A Case Study on Global Magnitude Pruning

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages