GithubHelp home page GithubHelp logo

global-pruning-with-minimum-threshold's Introduction

Global Magnitude Pruning With Minimum Threshold (GPMT)

This GitHub repository is the official repository for the paper "Global Magnitude Pruning With Minimum Threshold Is All We Need".

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_GP.py (or prune_GPMT.py), model_list.py, and the base model.

Training with GP and GPMT

To run the global magnitude pruning without minimum threshold (MT), run the prune_GP.py file. To run the global magnitude pruning with MT, run the prune_GPMT.py file. Finetuning code is included in both the files itself.

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

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

python3 prune_GP.py

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

python3 prune_GPMT.py

Dense Models:

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

GP and GP+MT Pruned Models:

These models are the checkpoints of pruned Resnet-50 on ImageNet models by GP and GP+MT.

Pruning Method Sparsity (%) Top-1 Acc (%) Model Links
GP 80 76.84 Pruned Model
GP + 0.05% MT 80 76.81 Pruned Model
GP 90 75.44 Pruned Model
GP + 0.05% MT 90 75.42 Pruned Model
GP 95.30 71.63 Pruned Model
GP + 0.005% MT 95.30 71.55 Pruned Model
GP 98.05 62.12 Pruned Model
GP + 0.005% MT 98.05 61.83 Pruned Model

global-pruning-with-minimum-threshold's People

Contributors

gpmt-authors avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.