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
It appears that the simplest way to implement an inference strategy is via a Joint funsor that keeps track of various Tensor, Gaussian, and Delta factors in a canonical, searchable data structure. This Joint object is really a state machine / interpreter disguised as a Funsor. Its denotational semantics are defined by its .eager_subs() method, and its operational semantics are defined by the transition operations we call on Joint objects during inference:
+= a log prob term with either a lazy or eager value
.reduce(ops.logaddexp, -) out variables when they are no longer live
.reduce(ops.sample, -) variables when they need a ground value (e.g. for control flow)
.reduce(ops.add, -) out plates when they are complete (see log_joint in minipyro.py)
Note that this can be sensibly implemented even before we implement sampling #52
Tasks
Implement a Joint funsor with Tensor, Gaussian, and various Delta terms
Implement += Tensor transition
Implement += Gaussian transition
Implement += Delta transition
Implement .reduce(ops.logaddexp, -) to eliminate random variables
Implement .reduce(ops.sample, -) to sample random variables
Implement .reduce(ops.add, -) to eliminate plates variables
Implement += Joint to fuse two state machines
Add tests
Use Joint in examples
The text was updated successfully, but these errors were encountered:
~~Blocked by #51 ~~
It appears that the simplest way to implement an inference strategy is via a
Joint
funsor that keeps track of variousTensor
,Gaussian
, andDelta
factors in a canonical, searchable data structure. ThisJoint
object is really a state machine / interpreter disguised as a Funsor. Its denotational semantics are defined by its.eager_subs()
method, and its operational semantics are defined by the transition operations we call onJoint
objects during inference:+=
a log prob term with either a lazy or eager value.reduce(ops.logaddexp, -)
out variables when they are no longer live.reduce(ops.sample, -)
variables when they need a ground value (e.g. for control flow).reduce(ops.add, -)
out plates when they are complete (see log_joint in minipyro.py)Note that this can be sensibly implemented even before we implement sampling #52
Tasks
Joint
funsor withTensor
,Gaussian
, and variousDelta
terms+= Tensor
transition+= Gaussian
transition+= Delta
transition.reduce(ops.logaddexp, -)
to eliminate random variables.reduce(ops.sample, -)
to sample random variables.reduce(ops.add, -)
to eliminate plates variables+= Joint
to fuse two state machinesJoint
in examplesThe text was updated successfully, but these errors were encountered: