Tensorflow Lite toco --mean_values --std_values?

爷,独闯天下 提交于 2019-12-04 18:16:12

For uint8 quantized models the input values are expected to be in the range 0 to 255. Even with FakeQuantization, the input values during training are often float values in a different range (for example, 0.0 to 1.0). The mean_value and std_value controls how the uint8 values in the range 0 to 255 map to the float values used during training. You can use this heuristic to determine these values:

mean_value = the uint8 value in the range [0, 255] that corresponds to floating point 0.0. So if the float range is [0.0, 1.0], then mean_value = 0.

std_value = (uint8_max - uint8_min) / (float_max - float_min). So if the float range is [0.0, 1.0], then std_value = 255 / 1.0 = 255.

We are working on ways to make this simpler. Hope this helps!

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