LQ-Nets: Learned Quantization for Highly Accurate and Compact Deep Neural Networks