Typos?
dmelis opened this issue · comments
David Alvarez-Melis commented
Hi, thanks for the implementation.
Two issues/questions:
- Shouldn't there be a log in L515 in maf.py?
- In that same function (evaluate),
labels
is created but never used. The same (true) y is used for every step of the outside for. Seems like it should bemodel.log_prob(x, labels)
in L527, and also, L521 should belabels[:,i] = 1
Kamen Bliznashki commented
Yes, thanks for pointing it out and correcting!
Re 1 - the log prior under a uniform prior for the labels is log(1/n_labels) as you point out.
Re 2 - the evaluate loop runs over each possible label and the labels are then marginalized vie the logsumexp, so log_prob should be evaluated using labels
as you point out.
I've corrected the code and rerun the evaluation table under the conditional mnist model -- the differences are within 2-10 nats except the maf contiional model which was lower by 50, which is surprising.