kumar-shridhar / PyTorch-BayesianCNN

Bayesian Convolutional Neural Network with Variational Inference based on Bayes by Backprop in PyTorch.
MIT License
1.42k stars 323 forks source link

Beta update has required parameters, train/validate reflect changes #47

Closed tuero closed 4 years ago

tuero commented 4 years ago

As it stands, the get_beta method is not complete: it is missing epoch and num_epoch arguments. Using the Soenderby beta update method results in a crash. Updating this method would then need to have train_model and validate_model also take in epoch and num_epoch as additional arguments.

This pull request adds the above two arguments to train/validate. It also uses the beta_type parameter in validate_model for consistency instead of using a hardcoded default.

Piyush-555 commented 4 years ago

@tuero Thank you for the PR. I left a comment, let me know what you think. Please note that this repository is a WIP and is undergoing several changes.

tuero commented 4 years ago

I've pushed an updated commit. No worries. I am referencing a project off this repo, and figured I would point out errors that I come across incase others are running into similar issues.

Piyush-555 commented 4 years ago

Thank you for the PR!