Home

Awesome

Depricated! The repo is based on Keras 1.2 and not maintained anymore. Check here if you use Keras 2.0.

An implemtation of binaryNet for Keras.

The binarized Dense and Conv2D are two keras layers, thus can be integrated into keras framework out of box.

To run the demo: python mnist_mlp.py # train a binary MLP model on MNIST python mnist_cnn.py # train a binary CNN model on MNIST

The code is according to the theano version. The only missing ingredient is that the learning rate is not scaled w.r.t. weight' fan-in & fan-out. (An involved patch is needed.)

Reference paper: BinaryNet: Training Deep Neural Networks with Weights and Activations Constrained to +1 or -1