Giter Site home page Giter Site logo

dgl's Introduction

Decoupled Greedy Learning

This contains the source code for key experiments associated with the paper https://arxiv.org/abs/1901.08164. If you find this code helpful please cite our paper

@article{belilovsky2019decoupled, title={Decoupled Greedy Learning of CNNs}, author={Belilovsky, Eugene and Eickenberg, Michael and Oyallon, Edouard}, journal={arXiv preprint arXiv:1901.08164}, year={2019} }

In all experiments there is a log file which is generated in the local directory containing the per epoch training/val accuracy and other useful data.

Coming soon.. (in a month or two) we will add some examples of implementations that distribute/parallelize across GPUs. If you are interested in an early version of that we can share by request.

For questions or comments please contact at: [email protected]

dni_comparisons

contains experiments used in Section 5 This relies on the package https://github.com/koz4k/dni-pytorch . Which is also copied in the directory for completness

end to end baseline

python cifar_cnn_dni.py

DNI

python cifar_cnn_dni.py --dni

DNI with context

python cifar_cnn_dni.py --dni --context

DGL (our method)

python cifar_dgl.py

imagenet_dgl

this contains our source code for the ImageNet experiments. Additionally this implementation provides a preliminary interface for specifying and learning greedy models, which will be released along with the paper.

VGG-13 K=10 layer by layer

python imagenet_dgl.py IMAGENET_DIR --arch vgg13 --block_size 1 --half --dynamic-loss-scale -j THREADS

VGG-13 K=4

python imagenet_dgl.py IMAGENET_DIR --arch vgg13 --block_size 3 --half --dynamic-loss-scale -j THREADS

VGG-19 K=4

python imagenet_dgl.py IMAGENET_DIR --arch vgg19 --block_size 4 --half --dynamic-loss-scale -j THREADS

VGG-19 K=2

python imagenet_dgl.py IMAGENET_DIR --arch vgg19 --block_size 8 --half --dynamic-loss-scale -j THREADS

ResNet152 K=2

python imagenet_dgl.py IMAGENET_DIR --arch resnet152 --half --dynamic-loss-scale -j THREADS

run baseline (end-to-end) code

Resnet152

python imagenet.py IMAGENET_DIR --arch resnet152 --half --dynamic-loss-scale -j THREADS

vgg13,vgg19. note: we use batchnorm versions of the pytorch baseline model repo for vgg, the models trained in our code above uses the batchnorm versions as well

python imagenet.py IMAGENET_DIR --arch vgg13_bn --half --dynamic-loss-scale -j THREADS

python imagenet.py IMAGENET_DIR --arch vgg19_bn --half --dynamic-loss-scale -j THREADS

ddg_comparisons

Comparison to DDG, separate README provided in directory

auxiliary_nets_study

From Sec 5 Auxiliary nets

compares auxiliary networks, to evaluate MLP-SR-aux

python cifar_dgl.py --type_aux mlp-sr

CNN auxiliary is given by 'cnn' and MLP auxiliary by 'mlp'

Learning curves

From Sec 5 Sequential vs Parallel. Contains notebook comparing the learnign curves for sequential greedy and dgl. To generate the logs run cifar_sequential_greedy.py for sequential and cifar_dgl.py for dgl with default arguments.

buffer_experiments

This repostory contains experiments associated with Section 5.3 that evaluate the asynchronous versions of DGL proposed in our work

An example can be run as follows with M=30, slowing down layer 3 (of 6 layers) by a factor 1.11 note: the slowdown factor reported in the paper is 1/(1-noise)

python cifar_buffer.py --buffer 30 --noise 0.1 --layer_noise 3 --seed 0

dgl's People

Contributors

eugenium avatar

Watchers

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