Relaxed quantization for discretized neural networks