All problems
Dequantize Int8
Problem
Dequantize a list of int8 codes back to floats: x_i = q_i * scale.
The signature is dequantize_int8(q, scale).
Hint
Dequantization is a single multiply per code, undoing the quantization scale.
Test cases
case 1
in: [[0,1,-1],0.1]
expected: [0,0.1,-0.1]
case 2
in: [[127,-128],0.5]
expected: [63.5,-64]
case 3
in: [[2],0.25]
expected: [0.5]
case 4
in: [[0],1]
expected: [0]
Starter codePython
def dequantize_int8(q, scale):
# Your code here
pass4 test cases · run your code against them in the editor