NVlabs / NVAE

The Official PyTorch Implementation of "NVAE: A Deep Hierarchical Variational Autoencoder" (NeurIPS 2020 spotlight paper)
https://arxiv.org/abs/2007.03898
Other
999 stars 163 forks source link

Possible typo in the log_p() function #42

Open univanxx opened 1 year ago

univanxx commented 1 year ago

Hi there and thanks for an amazing work! I was exploring the code and in the module distributions.py found out that the logarithm of standard normal distribution (normalized_samples in the code) is:

$$ \ln(p) = -0.5 \cdot x^2 - 0.5 \cdot \ln(2 \cdot \pi) - \ln(\sigma). $$

But why do we need a $\ln(\sigma)$ part? Isn't the formula above should look like:

$$ \ln(p) = -0.5 \cdot x^2 - 0.5 \cdot \ln(2 \cdot \pi)? $$

Thanks in advance for the clarifications!