hello, here I come again. Thanks for your patience for the last several posts.
My nn model still cannot work, so I run into openmv/src/omv/nn/nn.c and want to figure out how it works.
In the nn_transform_input method,
for (int y=0, i=0; y<data_layer->h; y++) {
int sy = (y*y_ratio)>>16;
for (int x=0; x<data_layer->w; x++, i++) {
int sx = (x*x_ratio)>>16;
int p = (int) IMAGE_GET_GRAYSCALE_PIXEL(img, sx+roi->x, sy+roi->y);
input_data[i] = (q7_t)__SSAT((((p - (int) data_layer->r_mean)<<7) + (1<<(input_scale-1))) >> input_scale, 8);
}
}
can you give an example of
input_data[i] = (q7_t)__SSAT((((p - (int) data_layer->r_mean)<<7) + (1<<(input_scale-1))) >> input_scale, 8);
?
Is this a normalization?
Thanks!