Coder Social home page Coder Social logo

mobilenet-v2-pruning's Introduction

MobileV2 Pruning

This repository aim to try out different pruning-approaches on lightweight Backbones.

Usage

  1. Training
    python main.py --arch MobileNetV2 (for l1norm pruner )
    python main.py --sr --arch MobileNetV2 (for slimming pruner) 
    python main.py --arch USMobileNetV2 (for Autoslim pruner )
    
  2. Pruning (prune+finetune)
    python prune.py --arch MobileNetV2 --pruner l1normpruner --pruneratio 0.6
    python prune.py --arch MobileNetV2 --pruner SlimmingPruner --sr --pruneratio 0.6
    python prune.py --arch USMobileNetV2 --pruner AutoSlimPruner
    

Results on Cifar10

BackBone Pruner Prune Ratio Original/Pruned/Finetuned Accuracy FLOPs(M) Params(M)
MobileV2 L1-Norm 0.6 0.937/0.100/0.844 313.5->225.5 2.24->1.15
MobileV2 Slimming Optimal Thres 0.922/0.485/0.915 313.5->214.5 2.24->0.98
MobileV2 AutoSlim <200 flops 0.922/0.795/0.919 313.5->218.5 2.24->1.037
VGG Slimming Optimal Thres 0.926/0.183/0.920 399.3->192.67 20.03->1.49
Resnet50 Slimming Optimal Thres 0.926/0.665/0.921 3448->1739 23.52->6.00

NOTE:

  1. args for VGG: --arch VGG --s 0.001 --sr --lr 0.02 --epochs 100

  2. args for resnet: --arch resnet50 --s 0.001 --sr --lr 0.02 --epochs 100

    Try yourself with different arguments!

TODO

Pruning Methodsd

Backbones

  • MobileV2
  • ShuffleNet
    ....

Reference

rethinking-network-pruning

Pruned-MobileNet_v2

mobilenet-v2-pruning's People

Contributors

apxlwl avatar jwh97nn 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.