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

Bug in VIMCO implementation? #46

Open
stefanwebb opened this issue Oct 13, 2016 · 0 comments
Open

Bug in VIMCO implementation? #46

stefanwebb opened this issue Oct 13, 2016 · 0 comments

Comments

@stefanwebb
Copy link

Should the following line,

https://github.com/casperkaae/parmesan/blob/master/examples/vimco.py#L248

actually read

g_lb_inference = T.mean(T.sum(dg(L_corr) * log_qz_given_x, axis=2) + L)

instead of

g_lb_inference = T.mean(T.sum(dg(L_corr) * log_qz_given_x) + L)

?

I think with the current code that the two terms in g_lb_inference have a different scaling. The T.sum reduces dg(L_corr) * log_qz_given_x to a single number, which is then broadcast across all the elements of L, which has dimensions batchsize x eq_samples. So the second term is scaled by 1/ (batchsize * eq_samples), whereas this term cancels in the first term because it is summed that many times

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

1 participant