Open
Description
We have some interesting operators on DynamicPPL models, such as condition
/ decondition
, fix
, and generated_quantities
. The advantage of these operators is that models can be specified without knowing them, which is in line with the broad principle of separating modelling and inference specification.
https://turinglang.org/DynamicPPL.jl/stable/api/#AbstractPPL.condition
The operators mentioned above prompt me to wonder whether we can introduce operators like minibatch
/ stocchastic_gradient
on models involving a loop over IID data points. These operators would throw an error if the input model does not contain IID data points but would return a new (minibatched
) model if it does.
cc @Red-Portal, who will find this useful for stochastic VI.