2020-06-19 08:39 AM
I have a simple binary classification ANN model built with Tensorflow Keras and converted as Tensorflowlite model. This model gets imported and analyzed on the cubeMX tool without any errors. There is no IO input required for this trial model, so allowing random numbers for input features. Without any modifications to the code imported to STM32CubeIDE and build succeeds. While debugging, i can see that inside MX_X_CUBE_AI_Process() --> aiRun() method is returning error code 23 and error Type as 18.
Since the analyze function succeeded during code generation process, i expected that this code runs without any modification. Any suggestions please?
2020-06-20 06:36 AM
I am using a simple dataset from following site https://archive.ics.uci.edu/ml/datasets/banknote+authentication and using tensorflow python model program as attached.
other information: X-CUBE-AI 5.1.1
Nucleo board: STM32F411RE
2020-06-23 10:23 AM
All,
Just posting the issue i found and workaround performed to get this done. There is some issue with TFlite converter program as of date. When tensorflow keras feature layer is included, it fails to properly function inside the STM32. I had to then revert to bare bone keras input layer building with numpy arrays and shapes defined. Once i included method, it imported well and also performs as expected in STM32.
note: dont forget to convert result output bytes back to float to infer the output in right way.
Attached is the revised python program.
All the best.