“量化”在解释器.get_input_details()中是什么意思?

发布于 2021-01-29 18:06:26

使用tflite并获取解释器的属性,例如:

print(interpreter.get_input_details())

[{'name': 'input_1_1', 'index': 47, 'shape': array([  1, 128, 128,   3], dtype=int32), 'dtype': <class 'numpy.uint8'>, 'quantization': (0.003921568859368563, 0)}]

什么'quantization': (0.003921568859368563, 0)意思

关注者
0
被浏览
43
1 个回答
  • 面试哥
    面试哥 2021-01-29
    为面试而生,有面试问题,就找面试哥。

    这意味着量化参数值:输入张量的标度和zero_point。

    使用公式将量化的uint8数q转换为浮点数f是必要的:

    f = (q - zero_point) * scale
    


知识点
面圈网VIP题库

面圈网VIP题库全新上线,海量真题题库资源。 90大类考试,超10万份考试真题开放下载啦

去下载看看