DoReFa-Net: Training Low Bitwidth Convolutional Neural Networks with Low Bitwidth Gradients

Shuchang Zhou, Yuxin Wu, Zekun Ni, Xinyu Zhou, He Wen +1 more
6/20/2016
2,326 citations
cs.NEcs.LG

Official code: tensorpack/tensorpack (6,279 stars, Python, Apache-2.0, TensorFlow, last commit 2023-08-06).

Abstract

We propose DoReFa-Net, a method to train convolutional neural networks that have low bitwidth weights and activations using low bitwidth parameter gradients. In particular, during backward pass, parameter gradients are stochastically quantized to low bitwidth numbers before being propagated to convolutional layers.

Show full abstract

As convolutions during forward/backward passes can now operate on low bitwidth weights and activations/gradients respectively, DoReFa-Net can use bit convolution kernels to accelerate both training and inference. Moreover, as bit convolutions can be efficiently implemented on CPU, FPGA, ASIC and GPU, DoReFa-Net opens the way to accelerate training of low bitwidth neural network on these hardware. Our experiments on SVHN and ImageNet datasets prove that DoReFa-Net can achieve comparable prediction accuracy as 32-bit counterparts. For example, a DoReFa-Net derived from AlexNet that has 1-bit weights, 2-bit activations, can be trained from scratch using 6-bit gradients to get 46.1\% top-1 accuracy on ImageNet validation set. The DoReFa-Net AlexNet model is released publicly.

View on arXivView PDF

Code Implementations(1)

TensorFlowApache-2.0

A Neural Net Training Interface on TensorFlow, with focus on speed + flexibility

6,2791,773Python, ShellDec 25, 20153 years agoApache-2.0
deep-learningmachine-learningneural-networksreinforcement-learningtensorflow

Similar Papers

Cite this paper

@article{zhou2016dorefanet,
  title  = {DoReFa-Net: Training Low Bitwidth Convolutional Neural Networks with Low Bitwidth Gradients},
  author = {Shuchang Zhou and Yuxin Wu and Zekun Ni and Xinyu Zhou and He Wen and Yuheng Zou},
  year   = {2016},
  eprint = {1606.06160},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1606.06160}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1606.06160.svg)](https://codeofpaper.com/paper/1606.06160)

Discussion