使用 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)
是什么意思?
最佳答案
表示量化参数值:输入张量的scale和zero_point。
这是使用公式将量化的 uint8 数字 q 转换为 float f 所必需的:
f = (q - zero_point) * scale
关于python - interpreter.get_input_details() 中的 'quantization' 是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54830126/