Giter Club home page Giter Club logo

generalizationstabilitytradeoff's Introduction

The Generalization-Stability Tradeoff in Neural Network Pruning

This repository is the official implementation of The Generalization-Stability Tradeoff in Neural Network Pruning.

Test accuracy dynamics.

Requirements

Install Anaconda, then create the following environment:

conda create -n GST python=3.7 scipy pandas=1.0.1 matplotlib=3.1.3 seaborn=0.10.0 pytorch=1.4 torchvision=0.5 cudatoolkit=10 -c pytorch
conda activate GST
conda install -c conda-forge pingouin

Run Experiments

With the GST conda environment and from the GeneralizationStabilityTradeoff directory, execute the Bash script in the scripts_for_experiments directory that corresponds to the experiment you want to run. For example, to run the experiment associated with Figure 2, run the following command:

bash scripts_for_experiments/Figure_2.sh

Create Figures

After your script has finished executing, the necessary data for the Figure will be stored in the logs directory, and you can create the Figure by running the corresponding graph program. For example, in the terminal inside the GeneralizationStabilityTradeoff directory, run:

python -m figures_and_tables.Figure_2

When the program is finished running, Figure 2 will appear in the figures_and_tables/PDFs directory.

As described in the Figure creation programs, some Figures require results from other experiments before they can be built. In particular, Figure 6 depends entirely on the VGG experiments that are run by scripts_for_experiments/Figure_2.sh, so if you're only interested in Figure 6, then run the Figure 2 bash script after editing out the ResNet runs.

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.