openai / glow

Code for reproducing results in "Glow: Generative Flow with Invertible 1x1 Convolutions"
https://arxiv.org/abs/1807.03039
MIT License
3.11k stars 515 forks source link

How to get probability of data point? #75

Open abbyvansoest opened 5 years ago

abbyvansoest commented 5 years ago

Let's say I have a trained model for some dataset X of unknown distribution. How can I use the Glow library to compute the probability of a new data point from the distribution?

I am looking at theinfer()function in train.py and f_encode()in model.py

What I'm doing right now is using the calculated objective in f_encode to compute p = tf.exp(objective). Is this correct? Could someone point me in the right direction?

yapdianang commented 5 years ago

Any follow ups or insights or this? Any idea how to get probability from demo/model? Thanks!