How to convert a float array to uint8_t array
Hi, I am trying to implement an audio classifier on stm32f746g-discovery board. I converted my keras model into a tflite file and successfully loaded it in the board.
I used integer only quantization on my model in order to decrease ram usage. I think it needs uint8_t type input. Currently I am having an issue converting float values to uint8_t type.
The model seems to be giving some outputs when I give some uint8_t array as an input but the outputs are nowhere near expected.
Here is how I try to convert float values to uint8_t:
float array[4290];
uint8_t sound[4290];
for(int i=0; i<4290; i++){
array[i] = 255*(array[i]-min)/(max-min);
sound[i] = (int)array[i];
}
Thanks a lot.
