vits_chinese icon indicating copy to clipboard operation
vits_chinese copied to clipboard

Bert 加入以后, 底模训练, KL loss爆炸.

Open ericwudayi opened this issue 1 year ago • 2 comments

感谢大大提供这么好的repo,

我这边在用训练一个基底模型, 用版主預先訓練好的prosody.pt 來做character embedding的提取, 然後把提取出來的feature跟chinses_ipa出來的音素做對齊. 這樣算出來的feature, 每一個時間點的norm大約在10左右

不知道在加入bert feature以后有没有发现KL爆炸的问题? 我對Bert feature加入很多normalization都沒有辦法解決這個問題. 不知道版主有沒有遇到過? image

def forward(self, x, x_lengths, bert, bert_legnths):
    bert_emb = self.tanh(self.bert_proj(self.tanh(bert)).transpose(1, 2))
    #bert_emb = bert_emb / (torch.norm(bert_emb, dim=-1).unsqueeze(-1) + 1e-5) * 0.0
    #bert_emb = self.bert_proj(bert).transpose(1, 2) #[b,t,h]
    x = self.emb(x) * math.sqrt(self.hidden_channels) + bert_emb # [b, t, h]

ericwudayi avatar Nov 02 '23 01:11 ericwudayi