3 ms·
Thought that Google's TensorFlow already does this and has since shortly after it was released - what am I missing? Example: https://www.tensorflow.org/mobile/
by saycheese 10y ago
Thought that Google's TensorFlow already does this and has since shortly after it was released - what am I missing?
Example:
https://www.tensorflow.org/mobile/ https://www.tensorflow.org/mobile/
- shpx 10y agoI think this is their paper http://www.arxiv-sanity.com/1603.05279 http://www.arxiv-sanity.com/1603.05279 and this is the (torch) code https://github.com/allenai/XNOR-Net https://github.com/allenai/XNOR-Net Cursory look suggests they quantize both the weights and functions during classification on the smart phone and during the forwards and backwards pass during training. But you still have to use a continuous version of your logic gate to get an error gradient during training, so I'm guessing they still do the training on "supercomputers" (a desktop with a gpu really).
- hidden-markov 10y agoTensorFlow supports weight quantization, but XNOR seems to be rewriting the trained model graph into a one that only uses binary boolean ops, and probably optimizing the graph along the way.
- Houshalter 10y agoThat uses lower precision arithmetic. In this case they are reducing the precision to 1 bit, apparently.
- emcq 10y agoXNOR-Net is not currently part of TensorFlow, although there is a feature request to support it. [0] The main difference is that XNOR-Net uses 1 bit quantized weights and XNOR+popcount to approximate the dot product of convolution, which can be implemented very efficiently by using 64-bit arithmetic instructions on a CPU to operate over 64 1-bit components in parallel. [1] TensorFlow's optimization is also using discretized weights, but AFAIK targeted at 8-bit quantized weights. [2] [0] https://github.com/tensorflow/tensorflow/issues/1592 https://github.com/tensorflow/tensorflow/issues/1592 [1] https://arxiv.org/pdf/1603.05279v4.pdf https://arxiv.org/pdf/1603.05279v4.pdf [2] https://petewarden.com/2015/05/23/why-are-eight-bits-enough-for-deep-neural-networks/ https://petewarden.com/2015/05/23/why-are-eight-bits-enough-...
- emcq 10y agoXNOR-Net is not currently part of TensorFlow, although there is a feature request to support it. [0] The main difference is that XNOR-Net uses 1 bit quantized weights and XNOR+popcount to approximate the dot product of convolution, which can be implemented very efficiently by using 64-bit arithmetic instructions on a CPU to operate over 64 1-bit components in parallel. [1] TensorFlow's optimization is also using discretized weights, but AFAIK targeted at 8-bit quantized weights. [2] [0] https://github.com/tensorflow/tensorflow/issues/1592 https://github.com/tensorflow/tensorflow/issues/1592 [1] https://arxiv.org/pdf/1603.05279v4.pdf https://arxiv.org/pdf/1603.05279v4.pdf [2] https://petewarden.com/2015/05/23/why-are-eight-bits-enough-for-deep-neural-networks/ https://petewarden.com/2015/05/23/why-are-eight-bits-enough-...
- arjo129 10y agoTF is not the nicest thing to work with. It is still very computationally expensive to use on embedded hardware platforms.