What does 'quantization' mean in interpreter.get_input_details()?

烂漫一生 提交于 2020-01-03 16:57:28

问题


Using tflite and getting properties of interpreter like :

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)}]

What does 'quantization': (0.003921568859368563, 0) mean?


回答1:


It means quantization parameters values: scale and zero_point of input tensor.

This is necessary to convert a quantized uint8 number q to floating point number f using formula:

f = (q - zero_point) * scale


来源:https://stackoverflow.com/questions/54830126/what-does-quantization-mean-in-interpreter-get-input-details

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!