From 327c88b4bb983adc7db8f27fe87b367bd71e2565 Mon Sep 17 00:00:00 2001 From: erogol Date: Mon, 18 May 2020 13:31:14 +0200 Subject: [PATCH] dme update --- tf/README.md | 18 +++++++++++++----- tf/requirements | 2 -- 2 files changed, 13 insertions(+), 7 deletions(-) delete mode 100644 tf/requirements diff --git a/tf/README.md b/tf/README.md index 04b6936c..0f9d58e9 100644 --- a/tf/README.md +++ b/tf/README.md @@ -1,12 +1,20 @@ ## Utilities to Convert Models to Tensorflow2 -Here there are utilities to convert trained Torch models to Tensorflow (2.2>=). +Here there are experimental utilities to convert trained Torch models to Tensorflow (2.2>=). -We currently support Tacotron2 with Location Sensitive Attention. +Converting Torch models to TF enables all the TF toolkit to be used for better deployment and device specific optimizations. -Be aware that our old Torch models may not work with this module due to additional changes in layer naming convention. Therefore, you need to train new models or handle these changes. - -We do not plan to share training scripts for Tensorflow in near future. But any contribution in that direction would be more than welcome. +Note that we do not plan to share training scripts for Tensorflow in near future. But any contribution in that direction would be more than welcome. To see how you can use TF model at inference, check the notebook. This is an experimental release. If you encounter an error, please put an issue or in the best send a PR but you are mostly on your own. + + +### Converting a Model +- Run ```convert_tacotron2_torch_to_tf.py --torch_model_path /path/to/torch/model.pth.tar --config_path /path/to/model/config.json --output_path /path/to/output/tf/model``` with the right arguments. + +### Known issues ans limitations +- We use a custom model load/save mechanism which enables us to store model related information with models weights. (Similar to Torch). However, it is prone to random errors. +- Current TF model implementation is slightly slower than Torch model. Hopefully, it'll get better with improving TF support for eager mode and ```tf.function```. +- TF implementation of Tacotron2 only supports regular Tacotron2 as in the paper. +- You can only convert models trained after TF model implementation since model layers has been updated in Torch model. diff --git a/tf/requirements b/tf/requirements deleted file mode 100644 index 75882a1d..00000000 --- a/tf/requirements +++ /dev/null @@ -1,2 +0,0 @@ -fuzzywuzzy -tensorflow>=2.2.0 \ No newline at end of file