Unlike pyro.sample
statements where each pyro.sample
statement in the model needs to have a matching pyro.sample
statement in the guide (except for observed sites), pyro.param
statements in general do not match between model and guide. pyro.param
statements used in the guide are variational parameters and are used to approximate the posterior distributions and shouldn’t be matched in the model. pyro.param
statements in the model are used for point estimates of variables and shouldn’t be matched in the guide. In your case, parameters mentioned in the previous reply are variational parameters in the guide and need to be replaced with fixed values in the model. pyro.param("sigma", ...)
, on the other hand, is in the model used for a point estimate of it and therefore can be removed from the guide. Hope this helps to explain it!
1 Like