Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loss is negative #7

Open
jlian2 opened this issue May 22, 2020 · 2 comments
Open

loss is negative #7

jlian2 opened this issue May 22, 2020 · 2 comments

Comments

@jlian2
Copy link

jlian2 commented May 22, 2020

I just run a demo program, in which I would love to perform on these data:
image
Actually, blue points are real data(x) while red points are z. The prior is N(mean of x, 0.01). Notice that I randomly set variance. Maybe 0.01 is larger than variance of x. Maybe smaller. I apply the default flows model in your ipynb. But loss varied from 800000->-30000->, and it is still decreasing. My question is how come negative loss would happen?
Plu, when I perform MAF/IAF,,,, loss would also be negative

@jlian2
Copy link
Author

jlian2 commented May 22, 2020

To complement,
image
image
As you can see, when loss goes negative, loss still decreases. But results seem to be better?

@gideonite
Copy link

Hi @jlian2, I've been playing around with the code in the repo as well.

  • I've also observed negative loss values. Since the loss is the negative log-likelihood, in fact what this should mean is that the likelihood is enormous. I think this means that it is essentially very peaked. This may correspond to overfitting. I've found that you can often get good results if you stop the training early.

  • It's hard to get a sense for the dataset that you are working with. Is it essentially a Gaussian with outliers? It wouldn't surprise me in flows with a Gaussian base distribution would not handle outliers well. Maybe this is a direction for future research?

  • Have you tried other flow models? Glow?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants