Open zanklanecek opened 3 years ago
While I don't understand using the whole train set length for computing ELBO on a minibatch, what is the (1-valid_size) in your question? Thanks
I think it should be
criterion = metrics.ELBO(batch_size).to(device)
since the ELBO is calculated based on each mini-batch. Is it correct? @kumar-shridhar
While I don't understand using the whole train set length for computing ELBO on a minibatch, what is the (1-valid_size) in your question? Thanks
I don't really understand the concept, but I am certain that they further divide their trainset into train and validation. So (1-valid_size) represents the actual size of the trainset.
If the actual length of training set must be used here, then my proposal should be correct. However, if ELBO is calculated based on each mini-batch, then @Nebularaid2000 solution should be the correct one.
https://github.com/kumar-shridhar/PyTorch-BayesianCNN/blob/d93bad543c3226cd0fe05c0cb0ba033c41b3caa6/main_bayesian.py#L116
Your training set is divided on train and validation. Shouldn't here be
(1-valid_size)*len(trainset)
?