Skip to content

Start from Interpret Neural Networks by Identifying Critical Data Routing Paths

Notifications You must be signed in to change notification settings

izackwu/CriticalPathPruning

 
 

Repository files navigation

CriticalPathPruning

How to Run Our Code

We implement our pruning algorithm based on the TensorFlow 1.4.1 with CUDA 8.0. We use CIFAR-100 dataset and VGG-16 network for all the experiments. Codes are available at Github Link

Prerequisite

To run our code, you have to download:

And you need to install following python pachages:

  • pickle
  • json
  • keras
  • numpy
  • tensorflow
  • sklearn

We suggest you to install Anaconda for convenience

Run the Code

Therre are several steps to run the code:

  1. run.py: this file generate class encodes. You should change classes or set loops to run all classes in this file
  2. trim_and_test.py: this file trim the model and test the accuracy with pruned model which has not been fine tuned yet. Change target_class_id for models of different classes
  3. run_finetune.py: this file fine tune the pruned model and test the accuracy with fine tuned models. You should change target_class_id for models of different classes

Notice: we use GPU for training, so you should designate certain GPU for training in these files.

About

Start from Interpret Neural Networks by Identifying Critical Data Routing Paths

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%