Skip to content

DingKe/BinaryNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Binarized Dense and Conv2D layers for Keras

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages