webppl
webppl copied to clipboard
Add an init option to sample
So that we have some way of initializing by hand when it's hard to do so automatically
Examples:
var foo = sample(Gaussian({mu: 0, sigma: 1}), {init: 10}); // static init
var bar = sample(Beta({a: 2, b: 2}));
var baz = sample(Exponential({a: 6}), {init: foo + bar}); // dynamic init
(Though it might make more sense to declare dynamic inits as functions that are only run while trying to initialize)
@null-a: This was addressed by #786, right?
@hawkrobe: No, that added an init
option to param
, not sample
.