Closed ihshareef closed 2 years ago
@ihshareef I think a bug comes from TFLite, you should ask a TensorFlow repo for this problem. TFlite always make a new bug in a new version :)))
I managed to fix the problem.
I retrained FastSpeech2 on Tensorflow 2.3.1 and used the Colab notebook associated with this repo to convert it to Tflite. It worked perfectly on Android, unlike before. So, as far as I can tell--models trained on Tensorflow 2.3.1 can be used stably with Android.
I'm just leaving this comment here so that others may benefit.
The only reason I ended up working with Tensorflow 2.4.1 was because Google Colab started giving me the following error: ImportError: cannot import name 'LayerNormalization'
This arose because of a conflict within Google Colab (which comes with Tensorflow 2.7.0 installed). The trick is to uninstall the existing installation and reinstall you desired version (2.3.1 in my case) -- check this answer on Stack Overflow.
I've trained FastSpeech 2 successfully, and it works as expected on Python. However, when I converted it to TFLITE and deployed it on Android, I'm getting the following run-time error.
I was able to run the whole pipeline successfully earlier this year. Since I used Google Colab for the training, I ended up using
tensorflow-gpu==2.4.1
for the training. I attempted doing the Tflite conversion using2.3.1
, and even though I was able to run the inference perfectly on Python: it kept failing on Android.Should I retrain the FastSpeech2 model and then convert? What can I do to solve the problem?