eloquentarduino / EloquentTinyML

Eloquent interface to Tensorflow Lite for Microcontrollers
284 stars 56 forks source link

Support for RNN (LSTM) #44

Closed expeon07 closed 2 years ago

expeon07 commented 2 years ago

Hi, would you know if there is a way to implement RNN in TFLite micro? I use LSTM for time series prediction but I have this error.

Only 1 subgraph is currently supported.

dustinjoe commented 2 years ago

I actually had the same question when I tried to run a LSTM model last summer for a paper submission: https://github.com/dustinjoe/TinyML-with-Cloud-for-PHM At that time, no official support for RNNs, I remember someone from Tensorflow team mentioned some memory issue. But this time point, official LSTM support seems to be on the way right now: https://github.com/tensorflow/tflite-micro/pull/1044

eloquentarduino commented 2 years ago

LSTM is indeed supported as many users reported. Be sure to use Tf==2.2.3

whubaichuan commented 1 year ago

@expeon07 @dustinjoe @eloquentarduino There is an operation called UnidirectionalSequenceLSTM in the official library description. But I am not sure whether that's LSTM you want or not.