Thanks for the comparison! That was interesting. Here are some tips:
- You can write the model more simply as
y = NormalWithSoftplusScale(loc=mu, scale=inv_softplus_sigma, sample_shape=N)
-
ed.KLqpgot to the answer in very few iterations and simply perturbed around the answer over more iterations. You can more stable scale parameters across runs using a smaller learning rate. - Never believe in automatic algorithms. They can give a false sense of security in toy problems and failure in real problems. In particular,
ed.HMChere is not automatic: you need to tune the step size parameter and number of leapfrog steps.
In general, successes/failures on a normal-normal model are not illuminating because they may not be indicative of real successes/failures. For example, decide on a real-world task such as Bayesian neural network classification on MNIST. How easy is it in the PPL to specify the program, inference, and evaluation metric? Which is most automatic? Which is most flexible with respect to the model and/or inference? Which is fastest? Which had the best documentation to help with this experiment?