Giter Club home page Giter Club logo

cacp's Introduction

Conditional Automated Channel Pruning for Deep Neural Networks (AAAI-21)

License

This repo contains the PyTorch implementation for paper Conditional Automated Channel Pruning for Deep Neural Networks.

CACP

Dependencies

Current code base is tested under following environment:

  1. Python 3.7.3
  2. PyTorch 1.3.1
  3. CIFAR-10 dataset

Using the following command to install the Dependencies:

pip install -r requirements.txt

Testing CACP

Current code base supports the automated pruning of Resnet56 on CIFAR10. The pruning of Resnet56 consists of 2 steps: 1. strategy search and export the pruned weights; 2. fine-tune from pruned weights.

To conduct the full pruning procedure, follow the instructions below:

  1. Strategy Search and Export the Pruned Weights
bash ./script/search_export_cacp.sh

Note: the checkpoint of best compressed models under different target rates will be automatically saved in the log folder.

  1. Fine-tune from Pruned Weights

After searching and exporting, we need to fine-tune from the pruned weights. For example, we can fine-tune using RL-step learning rate for 400 epochs by running:

bash ./script/finetune.sh

The following table is the result we get (results might vary a little from the paper due to different random seed):

Table

cacp's People

Contributors

luoyongsheng100 avatar liuyixin-louis 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.