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

Add tf.lite.Interpreter class to match upstream #10

Open mocleiri opened 2 years ago

mocleiri commented 2 years ago

Tensorflow lite already has a python Interpreter module. This allows the lite model to be run for example on a Linux box.

I don't want to remove the first part yet but do want to see if we can reshape the microlite module so that the interpreter is api compatible with the existing tensorflow lite python Interpreter class.

This would allow building the python on a regular computer and then when ready to run in micropython.

We could run it in the micropython unix port and then also on the device ports using the same syntax.

Its hard to debug micropython scripts when running since the debugger wants to let you debug the C and C++ underneath the interpreter.

So an advantage of this would be a script that is runnable in windows as a python script where the python variables can be debugged.

https://www.tensorflow.org/api_docs/python/tf/lite/Interpreter tf lite Interpreter-methods