Inference & Serving · Problem 2 of 5
Implement int8 symmetric per-channel weight quantization and dequantization for a linear layer.
Implement the function/class skeleton in the editor. Any correct approach is accepted.
import numpy as np
def quantize_per_channel(W):
raise NotImplementedError
def dequantize_per_channel(q, scale):
raise NotImplementedError
def quantized_linear(x, q, scale, bias=None):
raise NotImplementedErrorReady when you are
Submit your solution and a structured review appears here — verdict, score, and concrete feedback. Any correct approach passes.
Implement int8 symmetric per-channel weight quantization and dequantization for a linear layer.
Implement the function/class skeleton in the editor. Any correct approach is accepted.