mocleiri / tensorflow-micropython-examples

A custom micropython firmware integrating tensorflow lite for microcontrollers and ulab to implement the tensorflow micro examples.
MIT License
170 stars 79 forks source link

Investigate issues with optional ops breaking esp32 firmwares #63

Open mocleiri opened 2 years ago

mocleiri commented 2 years ago

Something is not working with what I merged for #28.

When I flash esp32 now there are repeated LoadProhibited errors and restarts. I was able to control-c and see this text:

Didn't find op for builtin opcode 'RESHAPE' version '1'. An older version of this builtin might be supported. Are you using an old TFLite binary with a newer model?

Failed to get registration from op code RESHAPE

AllocateTensors() failed!
Starting
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.

I may have to revert so that the esp32 builds work.

mocleiri commented 2 years ago

I reverted the change but will use this issue to try and solve the root cause. I tried but was unable to reproduce using the unix port.

mocleiri commented 2 years ago

In testing I needed to add RESHAPE and DEPTHWISE_CONV_2D to get micro-speech to work. I'm also having issues getting the ulab custom header approach to work right. If I have the exact alternate header approach it won't be added but it does seem to work if I include the tflm_ops.h file directly.

But then it will have to exist in all of the board/build directories.