karpathy / pytorch-normalizing-flows

Normalizing flows in PyTorch. Current intended use is education not production.
845 stars 98 forks source link

loss is negative #7

Open jlian2 opened 4 years ago

jlian2 commented 4 years ago

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 commented 4 years ago

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

gideonite commented 4 years ago

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