How to convert RNN/LSTM models using the mtk converter?

Hi everyone,
I’d like to ask if the mtk converter in the NeuroPilot SDK supports converting RNN/LSTM models to TFLite.

I’ve successfully converted an RNN/LSTM model (pb file) trained using TensorFlow into TFLite using tf.lite.TFLiteConverter(the official TensorFlow Python API).
However, when I try to convert the same models using the mtk converter, I encounter the following error:
RuntimeError: Cannot import the following TensorFlow operators: RandomStandardNormal, TensorListFromTensor, TensorListGetItem, TensorListReserve, TensorListSetItem, TensorListStack.

How can this be resolved? Also, when using the MTK converter to convert RNN/LSTM models, is there a restriction on the framework used to train the model?
For example, is it limited to PyTorch or TensorFlow?

Thanks!

Hi Samuel,

Thank you for the inquiry. Could you provide the official TFLite information and the MTK tool version you used in the experiment?

Different MTK Converter versions were designed based on a specific TFLite version. For example, NP8 Converter are designed with TFLite v2.17’s Op scope.

Looking forward to more information that we could assist you in solving the problem :slight_smile:

MTK,
Joying