Binarized Neural Networks: Training Neural Networks with Weights and Activation Constrained to +1 or -1
I implement Binarized Neural Network by chainer. There are three different point from ordinary CNN.
- Using Binarized Weight
- Using Binarized Input
- Using weight clip that constraine gradient to -1 < x < 1
But I don't implement these below.
- Shift Based Operation of
- Batch Normalization
- AdaMax
- XNOR Dot
- stochastic Binarization
./mnist_cnn.py
./cifar10_cnn.py
You can choose options
- gpu
- epoch
- batchsize
link_binary_convolution.py
and function_binary_convolution.py
define Link of chainer's object
net.py
defines network
weight_clip.py
constraines gradient to -1 < x < 1 at update step
I implemented these codes hillbig/binary_net as reference