NVlabs / LSGM

The Official PyTorch Implementation of "LSGM: Score-based Generative Modeling in Latent Space" (NeurIPS 2021)
Other
340 stars 49 forks source link

NLL evaluation issues during training #13

Open v18nguye opened 1 year ago

v18nguye commented 1 year ago

Dear authors, Thanks for providing this immersive codebase!

However, when reading through the code, I saw some ambiguous logic.

First, in evaluating NLL when training vada, the neg_log_p_ode output order is incorrect! it should be in the second output.

https://github.com/NVlabs/LSGM/blob/5eae2f385c014f2250c3130152b6be711f6a3a5a/train_vada.py#L218

Second, in the Elbo evaluation, I don't understand why you take the mean operation 2 consecutive times, while this operator applied for all elements in a matrix.

https://github.com/NVlabs/LSGM/blob/5eae2f385c014f2250c3130152b6be711f6a3a5a/evaluate_diffusion.py#L126 https://github.com/NVlabs/LSGM/blob/5eae2f385c014f2250c3130152b6be711f6a3a5a/evaluate_diffusion.py#L127

and,

https://github.com/NVlabs/LSGM/blob/5eae2f385c014f2250c3130152b6be711f6a3a5a/evaluate_diffusion.py#L131 https://github.com/NVlabs/LSGM/blob/5eae2f385c014f2250c3130152b6be711f6a3a5a/evaluate_diffusion.py#L132