Adaptive Quantization of Neural Networks