GithubHelp home page GithubHelp logo

namhoonlee / effect-dps-public Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 0.0 22 KB

Understanding the effects of data parallelism and sparsity on neural network training

License: MIT License

Python 100.00%
data-parallelism sparsity neural-network-training sparse-neural-network

effect-dps-public's Introduction

Understanding the Effects of Data Parallelism and Sparsity on Neural Network Training

This repository contains code for the paper Understanding the Effects of Data Parallelism and Sparsity on Neural Network Training (ICLR 2021).

Prerequisites

Dependencies

  • tensorflow >= 1.14
  • python >= 3.6

Datasets

Put the following datasets in your preferred location (e.g., ./data).

Usage

To measure the effect of data parallelism for the workload of Simple-CNN, MNIST and SGD:

$ python main.py --nruns 100 --path_data PATH_TO_DATA --datasource mnist --arch simple-cnn --target_sparsity 0.9 --batch_size A_BATCH_SIZE --train_iterations 40000 --optimizer sgd --decay_type constant --mparams_kind learning_rate --goal_error 0.02 --check_interval 100

To measure the effect of data parallelism for the workload of ResNet-8, CIFAR-10 and Nesterov:

$ python main.py --nruns 100 --path_data PATH_TO_DATA --datasource cifar-10 --arch resnet-8 --target_sparsity 0.9 --batch_size A_BATCH_SIZE --train_iterations 100000 --optimizer nesterov --decay_type linear --mparams_kind learning_rate momentum decay_steps end_learning_rate_factor --goal_error 0.4 --check_interval 100

If you want to measure the Lipschitz constant of gradients, run with check_lipschitz flag on.

See main.py to run with other options.

Citation

If you use this code for your work, please cite the following:

@inproceedings{lee2021dps,
  title={Understanding the effects of data parallelism and sparsity on neural network training},
  author={Lee, Namhoon and Ajanthan, Thalaiyasingam and Torr, Philip HS and Jaggi, Martin},
  booktitle={ICLR},
  year={2021},
}

License

This project is licensed under the MIT License. See the LICENSE file for details.

effect-dps-public's People

Contributors

namhoonlee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.