NATSpeech icon indicating copy to clipboard operation
NATSpeech copied to clipboard

How to compute negative log-likelihood?

Open hongchengzhu opened this issue 2 years ago • 0 comments

Dear author,

    In your code, you use `prior_dist = dist.Normal(0, 1)` to establish a normal distribution, and use `-prior_dist.log_prob(z_postflow).mean()` to compute NLL (z_postflow means the training output of post-net).  However, I don't understand how this method works. 

    Moreover, VITS uses `torch.sum(0.5 * (math.log(2*math.pi)+(z**2)) * x_mask, [1, 2])` to compute NLL; WaveGlow uses `z ** 2 / (2 * sigma**2)` to compute NLL. My second question is where their methods are different from yours.

    Wish you an early reply. Thank you.

hongchengzhu avatar Jun 29 '22 08:06 hongchengzhu