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.
The parameter
kl_loss_weight
of the__init__
method of theDenseVariational
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 variablekl_loss_weight
in thekl_loss
method of theDenseVariational
rather than usingself.kl_loss_weight
. I suggest you change thekl_loss
to useself.kl_loss_weight
rather than the corresponding global variable.