This repository implements the benchmarks in our paper "Ternary Weight Networks" which was accepted by the 1st NIPS Workshop on Efficient Methods for Deep Neural Networks (EMDNN), 2016.
Please cite TWNs in your publications if it helps your research:
@article{li2016ternary,
Author = {Li, Fengfu and Zhang, Bo and Liu, Bin},
Journal = {arXiv preprint arXiv:1605.04711},
Title = {Ternary Weight Networks},
Year = {2016}
}
Dependencies are identical with the master branch of Caffe. Check out project site for detailed instructions.
NOTE:
- Some layers may only have GPU implementation. Thus, CUDA support and GPU devices are required.
- The Makefile has been modified to accomodate Ubuntu 16.04. For previous version of Ubuntu, please replace the Makefile with the original one.
-
Preparing data
$./data/mnist/get_mnist.sh -
Converting data to lmdb
$./examples/mnist/create_mnist.sh -
Configurations
3.1 setting the PRECISION in the train_lenet_tn.sh
3.2 setting the DELTA value (0.7 default) -
Training
$cd examples/mnist
$sh train_lenet_tn.sh -
Run-time usage (to be added)
You are welcome to send message to ([email protected]) if you have any issue on this code.