Hi
I am studying this great TonyML book, it is very practical and useful.
I am a little confuse with the example in CH3
The code in CH3 seems has divide by 0 bug, since tflu_i_scale initialized with 0
or will it be replace somewhere ?
Thank you
Jack
float tflu_i_scale = 0.0f;
// Store the normalized and quantized samples in the circular buffers
t_vals[cur_idx] = quantize(t, tflu_i_scale, tflu_i_zero_point);
h_vals[cur_idx] = quantize(h, tflu_i_scale, tflu_i_zero_point);
inline int8_t quantize(float x, float scale, float zero_point)
{
return (x / scale) + zero_point;
}