Optimal Brain Compression: A Framework for Accurate Post-Training Quantization and Pruning