Coder Social home page Coder Social logo

ccep's Introduction

This package includes the Python code of the paper 'Neural Network Pruning by Cooperative Coevolution'.

ATTN: This package is free for academic usage. You can run it at your own risk. For other purposes, please contact Dr. Chao Qian ([email protected]).

ATTN2: ATTN2: This package was developed by Mr. Haopu Shang ([email protected]) and Mr. Jia-Liang Wu ([email protected]). For any problem concerning the code, please feel free to contact Mr. Shang or Mr. Wu.

Requirements

  • python==3.8.3
  • torch==1.8.2
  • torchvision==0.9.2
  • thop==0.0.31
  • prefetch_generator==1.0.1

Usage

Pruning on CIFAR-10

# ResNet56
python pruning.py --dataset cifar10 --arch resnet56  \
                  --ft_epoch 100 --lr_milestone 50 \
                  --dict_path ./models/resnet56.th  --pop_init_rate 0.95  \
                  --prune_limitation 0.90 --batch-size 128 --valid_ratio 0.8  \
                  --run_epoch 20
# VGG16
python pruning.py --dataset cifar10 --arch vgg  \
                  --ft_epoch 100 --lr_milestone 50 \
                  --dict_path ./models/vgg16.th  --pop_init_rate 0.95  \
                  --prune_limitation 0.90 --batch-size 128 --valid_ratio 0.8  \
                  --run_epoch 20

Pruning On ImageNet

# ResNet-50
python pruning.py --dataset ImageNet --arch resnet50  \
                  --ft_epoch 60 --lr_milestone 20 40 50 \
                  --data ./data/ImageNet  --pop_init_rate 0.9  \
                  --prune_limitation 0.85 --batch-size 256 --valid_ratio 0.99  \
                  --run_epoch 20
# ResNet-34
python pruning.py --dataset ImageNet --arch resnet34  \
                  --ft_epoch 60 --lr_milestone 20 40 50 \
                  --data ./data/ImageNet  --pop_init_rate 0.9  \
                  --prune_limitation 0.85 --batch-size 256 --valid_ratio 0.99  \
                  --run_epoch 20

You can find all the commands in the file 'run.sh' .

ccep's People

Contributors

flytortoise avatar

Watchers

 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.