SPARK: Scalable and Precision-Aware Acceleration of Neural Networks via Efficient Encoding