Skip to content

Pruning System in Keras for a Deeper Look Into Convolutions

License

Notifications You must be signed in to change notification settings

cuguilke/psykedelic

Repository files navigation

psykedelic

Pruning System in Keras for a Deeper Look Into Convolutions

Table of Contents

  1. Introduction
  2. Citation
  3. Dependencies
  4. Training
  5. Analysis

Introduction

This repository contains the official codes that are used to conduct the experiments described in the paper:

A Deeper Look into Convolutions via Eigenvalue-based Pruning
Ilke Cugu, Emre Akbas

Citation

If you use these codes in your research, please cite:

@article{cugu2021deeper,
  title={A Deeper Look into Convolutions via Eigenvalue-based Pruning},
  author={Cugu, Ilke and Akbas, Emre},
  journal={arXiv preprint arXiv:2102.02804},
  year={2021}
}

Dependencies

  • Prerequisites:
Python 3.7
Keras 2.2.4
Tensorflow 1.15
matplotlib 3.1.1
matplotlib_venn 0.11.5
NumPy 1.17.2
SciPy 1.3.1
scikit-learn 0.21.3
overrides 2.8.0
  • We also include a YAML script ./dev.yml that is prepared for an easy Anaconda environment setup.

Training

Training is done via run.py. To get the up-to-date list of commands:

python run.py --help

We include a sample script ./run_experiments.sh for a quick start.

Analysis

In order to understand the statistical significance of the empirical results, ./analysis/ExperimentRecorder.py stores cumulative results in experiments.json.

Then, we use ./analysis/ExperimentProcessor.py to examine the accumulated empirical data:

  • In order to produce complex vs. real eigenvalue distribution statistics LaTeX tables:
python ExperimentProcessor.py --eig_stats
  • In order to produce compression performance LaTeX tables:
python ExperimentProcessor.py --performance
  • In order to produce the set analysis charts that we include in the Appendix of the paper:
python ExperimentProcessor.py --set_analysis
  • In order to produce the pruning per significance threshold charts:
python ExperimentProcessor.py --pruning_per_threshold

...

  • In order to produce the pruning per layer charts:
python ExperimentProcessor.py --pruning_per_layer

...

  • In order to produce the pruning through epochs charts:
python ExperimentProcessor.py --performance_history

...