cancel
Showing results for 
Search instead for 
Did you mean: 

INTERNAL ERROR: tuple index out of range for simple tflite model

DBany.1
Associate II

Dear STM Community,

I am trying to deploy a simple tflite model on my STM32, but I can't get through the analyze step. The model is intended to get a Nx42 matrix (dynamic size), perform some multiplications and additions, and return a fixed size vector with extracted features such as min, max, and mean vaules. The tflite model runs on computer without any problem.

The error I get is the following:

INTERNAL ERROR: tuple index out of range

I also tried to create a keras model of it with a custom layer, but for understandable reasons it is not working either.

I attach the tflite file, maybe it will help.

Thanks,

Daniel

2 REPLIES 2
jean-michel.d
ST Employee

​Hello Daniel,

First X-CUBE-AI doesn't support dynamic size.  All input/output shapes should be fixed.

However in the attached TFLite file the input shape is (1,42)  and output shape is (1, 126).  but during the import of the ReduceMin operator, there is an issue, when the parameters are evaluated (in our case the operator will be mapped on a 1D maxpooling), certainly due to the output which has not batch dimension. We keep the point for investigation.

br,

Jean-Michel

DBany.1
Associate II

Thanks for the reply,

unfortunately I will need the ability to rescale the input size, therefore I'm going to look for other ways to solve this problem than using a tflite model.

Daniel