tensorflow / probability

Probabilistic reasoning and statistical analysis in TensorFlow
https://www.tensorflow.org/probability/
Apache License 2.0
4.16k stars 1.08k forks source link

A bug in Linear_Mixed_Effects_Models.ipynb #1800

Open rasoolianbehnam opened 3 months ago

rasoolianbehnam commented 3 months ago

There seems to be a bug in the model specification. in

tfd.MultivariateNormalDiag(
          loc=tf.zeros(num_students),
          scale_diag=self._stddev_students * tf.ones(num_students)),
tfd.MultivariateNormalDiag(
          loc=tf.zeros(num_instructors),
          scale_diag=self._stddev_instructors * tf.ones(num_instructors)),
tfd.MultivariateNormalDiag(
          loc=tf.zeros(num_departments),
          scale_diag=self._stddev_departments * tf.ones(num_departments)),

it seems that self._stddev_students, self._stddev_instructors, and self._stddev_students are not being tracked by the GradientTape and therefore not updated properly in the m step.