From 12ab5ba89c7c75026c235c06f16595197f2b3bfc Mon Sep 17 00:00:00 2001 From: rafaelvalle Date: Thu, 7 Jun 2018 20:28:52 -0700 Subject: [PATCH] model.py: setting weight initialization to xavier uniform --- model.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/model.py b/model.py index 8ea9a2c..263faa6 100644 --- a/model.py +++ b/model.py @@ -459,6 +459,8 @@ class Tacotron2(nn.Module): self.n_frames_per_step = hparams.n_frames_per_step self.embedding = nn.Embedding( hparams.n_symbols, hparams.symbols_embedding_dim) + torch.nn.init.xavier_uniform_(self.embedding.weight.data) + self.encoder = Encoder(hparams) self.decoder = Decoder(hparams) self.postnet = Postnet(hparams)