Tiny ML model gives worng predictions when uploaded to nrf52840

I have created a edge impulse tiny ml model for recognizing accelerometer values. In edge impulse it works properly with accuracy of 95%. But when downloading C++ library of the model and using it with my custom made nrf52840 sdk, it doesn’t recognize my motions. Its log prints the predictions, but they are all wrong.

Hello @parth.np,

Which one of your edge impulse project gives you different results? I can see 4 projects attached to your account.

Are the accelerometer settings the same? sensibility, frequency, …?

Also can you try to run on your device the float32 version (unoptimized) of your model and fill the features buffer with known data in your code.
You can get them from the live classification page and select the raw features of your data sample. See here to learn how to grab the raw features: On your desktop computer.

Then you will be able to compare the predicted values between the ones given in Edge Impulse Studio and the ones given by your device. If they are the same, your issue is most likely to come from your sensor configuration. If not, let me know we might have an issue on our side.

Best regards,

Louis