PyTorch-BayesianCNN icon indicating copy to clipboard operation
PyTorch-BayesianCNN copied to clipboard

Input argument for ELBO criterion

Open zanklanecek opened this issue 4 years ago • 3 comments

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)?

zanklanecek avatar Jun 01 '21 10:06 zanklanecek

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

rahulrathnakumar avatar Aug 30 '21 08:08 rahulrathnakumar

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

Nebularaid2000 avatar Nov 26 '21 07:11 Nebularaid2000

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.

zanklanecek avatar Nov 26 '21 12:11 zanklanecek