Merge branch 'master' into fix-gan-dur

This commit is contained in:
Stardust·减
2023-08-30 09:36:42 +08:00
committed by GitHub
4 changed files with 26541 additions and 8 deletions

View File

@@ -669,8 +669,7 @@ class SynthesizerTrn(nn.Module):
l_length_sdp = self.sdp(x, x_mask, w, g=g)
l_length_sdp = l_length_sdp / torch.sum(x_mask)
#logw_ = torch.log(w + 1e-6) * x_mask
logw_ = torch.log((w-torch.rand_like(w)) * x_mask + 1e-6) * x_mask
logw_ = torch.log(w + 1e-6) * x_mask
logw = self.dp(x, x_mask, g=g)
l_length_dp = torch.sum((logw - logw_) ** 2, [1, 2]) / torch.sum(x_mask) # for averaging