Reputation: 21
I have convert a PB file to tflite with uint8 quantization. I would like to know how to convert the output from uint8 back to float so that the previous code can still work.
Upvotes: 1
Views: 943
Reputation: 57173
Usually, the range of float is [-1..1]
, so the formula is
putFloat((uint8Val - 127.5)/127.5)
But this actually depends on the quantization parameters mean and std you used. Note that recently tflite switched to int8 in range [-128..127]
.
Upvotes: 1