Hi,
I have a noob question. I am going over Introduction to Pyro — Pyro Tutorials 1.8.1 documentation and I see that the hyperparameters in the model and the variational parameters in the guide are different in the given example. For example, a
is defined in custom_guide
as
a_loc = pyro.param('a_loc', lambda: torch.tensor(0.))
a_scale = pyro.param('a_scale', lambda: torch.tensor(1.), constraint=constraints.positive)
a = pyro.sample("a", dist.Normal(a_loc, a_scale))
and in model
as
a = pyro.sample("a", dist.Normal(0., 10.))
Furthermore, I see in the same example that the distributions for sigma
are different in the model and guide (It is Uniform
in the model and Normal
in the guide)
I have two questions following this:
- Is there any particular reason why distribution parameters/distributions are different in the guide and model?
- When should I consider choosing the distribution parameters/distributions in the model and guide differently?