krasserm / bayesian-machine-learning

Notebooks about Bayesian methods for machine learning
Apache License 2.0
1.8k stars 460 forks source link

The parameter kl_loss_weight of the __init__ method of the DenseVariational class is not used #6

Closed nbro closed 4 years ago

nbro commented 4 years ago

The parameter kl_loss_weight of the __init__ method of the DenseVariational class is not used because, in the notebook (https://github.com/krasserm/bayesian-machine-learning/blob/master/bayesian_neural_networks.ipynb), you're using the global variable kl_loss_weight in the kl_loss method of the DenseVariational rather than using self.kl_loss_weight. I suggest you change the kl_loss to use self.kl_loss_weight rather than the corresponding global variable.

krasserm commented 4 years ago

Good catch, thanks for reporting!