Git Product home page Git Product logo

gradient-quantization's Introduction

quantization for stochastic gradient

Run HSQ(d=16, m=2^8=256, 6bit for norm quantization)

python main.py  --quantizer hsq  --network resnet50 --dataset cifar10 \
--c-dim 16  --k-bit 8 --n-bit 6 --num-users 8 --batch-size 32 --logdir logs_hsq  --log-epoch 10
python main.py  --quantizer hsq  --network fcn --dataset mnist \
--c-dim 16  --k-bit 8 --n-bit 6 --num-users 8 --batch-size 32 --logdir logs_hsq  --log-epoch 10

Run SGD

python main.py  --quantizer sgd  --network resnet50 --dataset cifar10 \
--num-users 8 --batch-size 32 --logdir logs_sgd  --log-epoch 10
python main.py  --quantizer sgd  --network fcn --dataset mnist \
--num-users 8 --batch-size 32 --logdir logs_sgd  --log-epoch 10

Run QSGD(2bit, d=128)

python main.py  --quantizer qsgd --network resnet50 --dataset cifar10 \
--c-dim 128 --n-bit 2 --num-users 8 --batch-size 32 --logdir logs_qsgd  --log-epoch 10
python main.py  --quantizer qsgd --network fcn --dataset mnist \
--c-dim 128 --n-bit 2 --num-users 8 --batch-size 32 --logdir logs_qsgd --log-epoch 10

Run TernGrad(1bit-QSGD, d=#parameters in each layer )

python main.py  --quantizer qsgd --network resnet50 --dataset cifar10 \
--c-dim 0 --n-bit 1 --num-users 8 --batch-size 32 --logdir logs_terngrad  --log-epoch 10
python main.py  --quantizer qsgd --network fcn --dataset mnist \
--c-dim 0 --n-bit 1 --num-users 8 --batch-size 32 --logdir logs_terngrad --log-epoch 10

Run SignSGD

python main.py  --quantizer sign --network resnet50 --dataset cifar10 \
--num-users 8 --batch-size 32 --logdir logs_signsgd  --log-epoch 10
python main.py  --quantizer sign --network fcn --dataset mnist \
--num-users 8 --batch-size 32 --logdir logs_signsgd --log-epoch 10

gradient-quantization's People

Contributors

xinyandai avatar yang-han 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.