Skip to content

VNNGP with Batches #2300

Answered by LuhuanWu
Turakar asked this question in Q&A
Mar 12, 2023 · 4 comments · 1 reply
Discussion options

You must be logged in to vote

Hi @Turakar , I believe I've fixed the issue and submitted an PR here #2375 .

Based on this PR and a slightly-modified version of your test codes, I am able to get reasonable results. For example, see the prediction results for k=20 and k=50 in the attached figures.

P.S. There is a small mistake in your original code:

 mll = PredictiveLogLikelihood(model.likelihood, model, num_data=x.size(0))

num_data here should be the number of data points instead of the model batch size, i.e. num_data=x.size(1) or equivalently train_y.size(1) in this example.

I also added the ELBO as an option for training objective, which is used in the paper.

mll = VariationalELBO(model.likelihood, model, num_data=tr…

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Turakar
Comment options

Answer selected by Turakar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants