Binary CNN in caffe/ristretto

324 views
Skip to first unread message

Mauricio C

unread,
Jan 4, 2017, 12:33:13 PM1/4/17
to ristretto-users
Hi!

I'm working with ristretto cause i'm researching on differents types of quantization techniques. About implemented binary CNN ( https://arxiv.org/abs/1602.02830 ). Is this possible to do  modifing ristretto code or using Python API?
If somebody has a clue about a solution to this I'll be greatful, because I'm starting to desing a solution.

Thanks a lot!

Best regards!


Mauricio

pmg...@ucdavis.edu

unread,
Jan 9, 2017, 12:52:49 PM1/9/17
to ristretto-users
Hi Mauricio,

Thanks for your question about implementing binary networks in Caffe. Ristretto supports fixed point simulation and is not well-suited for very small bit-width representations (such as one bit). Ristretto contains re-implementations of the most important layer types in fixed point. The way Ristretto works is it just swaps floating point layers with fixed point layers. The gradient computation and weight updates are left unchanged.

For binary networks, however, you will have to change both the layer computation as well as the way the weight gradients get computed and applied. Moreover you will have to include a batch-norm layer which can handle the binary inputs and outputs.

The paper you mentioned has open-source code which could give you a good starting point. Good luck with the implementation!

Best,
Philipp
Reply all
Reply to author
Forward
0 new messages