Commit Graph

3 Commits

Author SHA1 Message Date
iabdalkader
93e17a3a8d modules/py_ml: Remove input/output callbacks. 2024-07-07 21:48:42 +03:00
iabdalkader
70b89f4744 modules/py_ml: Update ML API to support multi-input models. 2024-07-07 21:48:42 +03:00
iabdalkader
c7228cbb48 modules/py_tf: Refactor TensorFlow module.
This patch decouples the MicroPython TF module from the TensorFlow library,
allowing support for more DL/ML libraries and engines in the future.

The ML backend has been completely redesigned; the model object can now be
passed directly to the backend, allowing it to initialize the model internally.
Additionally, the backend's state/memory is now persistent (surviving across
invocations), which improves inference speed by around 20% and supports models
that require persistent memory, such as LSTM.

Finally, the ML module has been mostly rewritten to handle model input/output
shapes and data properly, and to support models with multiple outputs
2024-06-28 16:32:04 +02:00