反量化

This commit is contained in:
ylzz1997
2023-08-30 00:56:19 +08:00
parent a38eee3f00
commit b87a9d2375
2 changed files with 26532 additions and 0 deletions

View File

@@ -665,6 +665,8 @@ class SynthesizerTrn(nn.Module):
attn = monotonic_align.maximum_path(neg_cent, attn_mask.squeeze(1)).unsqueeze(1).detach()
w = attn.sum(2)
# 反量化
w -= torch.rand_like(w)
l_length_sdp = self.sdp(x, x_mask, w, g=g)
l_length_sdp = l_length_sdp / torch.sum(x_mask)