Comparing quantized and original weights is the basic check of a quantization scheme. The mean absolute error summarizes how far the rounded weights are from the originals.
Implement quantization_error(x, bits), the mean absolute error of symmetric quantization.
Quantize and dequantize as in the previous questions, then average the absolute differences.
No results yet
Run your code to check it against the examples, or submit to run every test.