Giter Site home page Giter Site logo

sgd_comp_gen's Introduction

Repository for the paper Heavy Tails in SGD and Compressibility of Overparametrized Neural Networks

This repository includes the accompanying code for the paper https://arxiv.org/abs/2106.03795. Here we describe the steps necessary to reproduce the main results presented in the paper. Feel free to contact Melih Barsbey ([email protected]) for any questions or comments!

Training the algorithms

Please use the file run.py to specify the combinations of parameters you want to run the experiments for, as well as the folder in which you want them to be saved. The experiment jobs will be written to files inside the folder ./jobs/. Run these files to produce the results in your desired results directory.

Warnings

  • Make sure you allocate a separate folder for every architecture-dataset combination!
  • Please see the file all_experiment_settings.csv for all models presented in the paper.
  • Set all seeds to 0 to obtain original results.

Alpha estimation

Please run the file alpha_estimation.py from the command line with the appropriate parameters (see inside the file for help) to obtain alpha estimations for separate layers of your model, as well as aggragate alpha hat values such as mean or median. Training and test accuracies and losses will also be included in this file. The results will be written inside a folder inside your main results folder that includes "results_summary" as a .csv file.

Magnitude pruning

To conduct magnitude pruning, run the file magnitude_pruning.py with the appropriate parameters (see inside the file for help). Results of magnitude pruning will be written inside the results summary folder as a .csv file.

Singular value pruning

To conduct singular value pruning, first run the file svd.py with the appropriate parameters. This will create and store the results of the SVD inside your results folder. Then run the file spectral_pruning.py with the appropriate parameters (see inside the file for help). Results will be written inside the results summary folder as a .csv file.

Node pruning

To conduct node pruning, run the file nb_pruning.py with the appropriate parameters (see inside the file for help). Results of magnitude pruning will be written inside the results summary folder as a .csv file.

Other experiments

For other numerical results presented in the paper see the other_experiments.ipynb file.

sgd_comp_gen's People

Contributors

mbarsbey avatar

Stargazers

Yefan avatar

Watchers

James Cloos avatar  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.