Unexpected model output

Hi,

On the EI platform I created a model for detection of 3 human activities: “sitting”, “jumping” and “walking”. Based on some Accelerometer( x,y,z) data with a frequency of 26Hz.
When I import the tflite model in my ST device, my output is not as expected at all (looks more like randomly jumping between sitting and jumping).

Now I’m diffing the generated C libs with a previous loaded model “standing - walking - running” which worked. But I see some differences in the HEIGHT / CHANNEL and SIZE.

Network.h file of “Working” model not exported from the website:
#define AI_NETWORK_IN_1_HEIGHT (26)
#define AI_NETWORK_IN_1_CHANNEL (3)
#define AI_NETWORK_IN_1_SIZE (26 * 3)
#define AI_NETWORK_IN_1_SIZE_BYTES (312)

Model exported from EI website:
#define AI_NETWORK_IN_1_CHANNEL (33)
#define AI_NETWORK_IN_1_SIZE (33)
#define AI_NETWORK_IN_1_SIZE_BYTES (132)

Can someone explain how the channel and height is extracted from the EI platform?

Thanks in advance.

Hi @fferket,

Can you describe where you are seeing this network.h file and AI_NETWORK_IN_1_* parameters? I cannot find them when I download the C++ library from Edge Impulse.

Hi Shawn,

I use the tensorflow lite model exported from the dashboard.
This one is imported by CubeMX of which generates these network.h files.

Or is this a question I can better ask in the ST forum?

Hi @fferket,

If you are downloading the tflite model file, I am honestly not too sure how CubeMX is importing that file. In which case, you might be better off asking on the ST forum (they’re usually pretty responsive there).