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

Refactor Interpreter.invoke to preserve the initialized interpreter #14

Closed mocleiri closed 2 years ago

mocleiri commented 2 years ago

I just noticed that the interpreter is being recreated on each invoke call. We should be able to keep the initialized instance around and store the tensorflow c++ interpreter as an mp_obj_t on the microlite_interpreter_t object.

mocleiri commented 2 years ago

This has been merged. We probably have to revisit the destructor case.