You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes we have domain knowledge about a good initial state, e.g., when the code is run in an online fashion and we want to incorporate new observations into existing inference. In such cases, it would be useful to have a way to initialize MCMC with a given state, or distribution of state values (e.g., maybe represented by a model itself).
The text was updated successfully, but these errors were encountered:
Hi @ssnl , right now you can change initial_trace of an MCMC kernel as follows:
initial_trace = pyro.poutine.trace(model).get_trace(*args, **kwargs) # args, kwargs are arguments of your model
initial_trace.nodes["a"]["value"] = initial_a
nuts_kernel.initial_trace = initial_trace # this changes the initial_trace of a kernel
As a side note, right now we don't have a public interface to set initial_traces for different chains. I'll think about how to support it if it is useful for you.
Issue Description
Sometimes we have domain knowledge about a good initial state, e.g., when the code is run in an online fashion and we want to incorporate new observations into existing inference. In such cases, it would be useful to have a way to initialize MCMC with a given state, or distribution of state values (e.g., maybe represented by a model itself).
The text was updated successfully, but these errors were encountered: