def dequantize_output(data, output_binding_info):
    """Dequantize the (u)int8 output to float"""

    if output_binding_info[1].IsQuantized():
        if data.ndim != 2:
            raise RuntimeError("Data must have 2 dimensions for quantization")

        quant_scale = output_binding_info[1].GetQuantizationScale()
        quant_offset = output_binding_info[1].GetQuantizationOffset()

        data = data.astype(float)
        for row in range(data.shape[0]):
            for col in range(data.shape[1]):
                data[row, col] = (data[row, col] - quant_offset)*quant_scale
    return data