Comments (11)
@linhld0811 cay you try
pretrained_config.vocab_size = NEW_VOCAB_SIZE
tacotron2 = TFTacotron2(pretrained_config, training=True, name='tacotron2')
tacotron2._build()
tacotron2.summary()
tacotron2.load_weights(path, by_name=True, skip_mismatch=True)
....
btw, what is ur tensorflow version ?
from tensorflowtts.
@linhld0811 no i mean this code, i just test and it worked.
pretrained_config = Tacotron2Config(**config["tacotron2_params"])
pretrained_config.vocab_size = NEW_VOCAB_SIZE
tacotron2 = TFTacotron2(config=pretrained_config, training=True, name='tacotron2')
tacotron2._build()
tacotron2.summary()
tacotron2.load_weights("./examples/tacotron2/exp/train.tacotron2.v1/checkpoints/model-120000.h5", by_name=True, skip_mismatch=True)
from tensorflowtts.
@sujeendran no, the code should be like this, do not need re build and redefine embedding layer
pretrained_config = Tacotron2Config(**config["tacotron2_params"])
pretrained_config.vocab_size = NEW_VOCAB_SIZE
tacotron2 = TFTacotron2(config=pretrained_config, training=True, name='tacotron2')
tacotron2._build()
tacotron2.summary()
tacotron2.load_weights("./examples/tacotron2/exp/train.tacotron2.v1/checkpoints/model-120000.h5", by_name=True, skip_mismatch=True)
from tensorflowtts.
Here my code:
tacotron2 = TFTacotron2(config=Tacotron2Config(**config["tacotron2_params"]), training=True, name='tacotron2')
tacotron2._build()
#tacotron2.summary()
if args.pretrained_model != None:
print("use pretrained_model ljspeech", args.pretrained_model)
tacotron2.load_weights(args.pretrained_model)
pretrained_config = Tacotron2Config(**config["tacotron2_params"])
pretrained_config.set_params(len(symbols))
print("vocab_size of new model:", pretrained_config.vocab_size)
new_embedding_layers = TFTacotronEmbeddings(pretrained_config, name='embeddings')
tacotron2.encoder.embeddings = new_embedding_layers
tacotron2._build()
tacotron2.summary()
I use TF version 2.2.0
from tensorflowtts.
Thanks, i fixed this error. I loaded model but did not use the param skip_mismatch=True of the function tacotron2.load_weights
from tensorflowtts.
@sujeendran Fixed.
from tensorflowtts.
I have a question, can you help me to figured out:
- Can i use your pretrained tacotron2 model to extract duration of my own dataset(not english) to teach fastspeech model?! Or i have to training tacotron2 model on my dataset and use best_model to extract duration?!
from tensorflowtts.
You cannot do that :))
from tensorflowtts.
@dathudeptrai I tried the same. Didn't work. I'm also running Tensorflow 2.2.0. To be clear, here is the code after your fix:
pretrained_config = Tacotron2Config(**config["tacotron2_params"])
tacotron2 = TFTacotron2(pretrained_config, training=True, name='tacotron2')
tacotron2._build()
tacotron2.summary()
tacotron2.load_weights("./examples/tacotron2/exp/train.tacotron2.v1/checkpoints/model-1400.h5", by_name=True, skip_mismatch=True)
pretrained_config.vocab_size = len(symbols)
new_embedding_layers = TFTacotronEmbeddings(pretrained_config, name='embeddings')
tacotron2.encoder.embeddings = new_embedding_layers
# re-build model
tacotron2._build()
tacotron2.summary()
from tensorflowtts.
@dathudeptrai Oh, in that case my fix was doing the same. Thanks! :) Maybe you can update the documentation for fine-tuning now that this is clear so others don't fall into this issue again.
from tensorflowtts.
Yeah i will update it asap :))) maybe add some flags :3
from tensorflowtts.
Related Issues (20)
- Multi Speaker Training HOT 1
- Support Arabic Language HOT 2
- Tacotron2 Pre-training have difficulties
- Training Tacotron2 model became so slow after update HOT 1
- How do I get the RTF index HOT 1
- Japanese TTS model HOT 2
- Preprocessing error with ljspeech HOT 6
- tacotron2 parameter confusing, hop size configuration for databaker dataset is 256, not 300 HOT 1
- Installation on MacOS HOT 1
- Hifi-Gan config for Baker dataset HOT 1
- tensorflow-gpu==2.7.0 HOT 15
- Dose it support mutil speaker of chinese language ? HOT 1
- Android release as TTS engine HOT 7
- Train with another dataset HOT 2
- No module named 'tensorflow_tts' HOT 2
- Inference on MB MelGAN sounds great until testing on iOS HOT 3
- TensorFlowTTS support vietnamese HOT 2
- [MB_Melgan] Why is a model trained only generator is better than trained on both?
- support chinese HOT 2
- How to config CMakeLists.txt ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tensorflowtts.