TensorSpeech / TensorFlowTTS

:stuck_out_tongue_closed_eyes: TensorFlowTTS: Real-Time State-of-the-art Speech Synthesis for Tensorflow 2 (supported including English, French, Korean, Chinese, German and Easy to adapt for other languages)
https://tensorspeech.github.io/TensorFlowTTS/
Apache License 2.0
3.85k stars 815 forks source link

use of _build for dummy input #390

Closed wsr692 closed 3 years ago

wsr692 commented 4 years ago

https://github.com/TensorSpeech/TensorFlowTTS/blob/ea72bab6cef40dff68b0b619ecf0d7c9cce3e3f0/tensorflow_tts/models/fastspeech2.py#L123

https://github.com/TensorSpeech/TensorFlowTTS/blob/ea72bab6cef40dff68b0b619ecf0d7c9cce3e3f0/tensorflow_tts/models/fastspeech2.py#L134

Hi, I thanks for keeping up this great work. May I ask why you chose to make _build execute call(by self) by feeding the fake input ? I see this in tacotron2, melgan & fastspeech1&2, I wonder why this was necessary. Is it to check if model call succeeds?

dathudeptrai commented 4 years ago

Hi, we need to feed a fake input to the call function to build a model so make it to be able to load_weights :D.

wsr692 commented 4 years ago

Oh, so that was for loading pretrained model. Thanks!

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.