Open
Description
Define a way of deactivating the effects of the "datamodel" in a RVs which is built
inside the context of a datamodel. This might be the case of RVs
defined inside a Bayesian NN (probabilistic weights or activations). Take for instance
the following code where weights are created when decoder
is invoked.
@inf.probmodel
def vae(k, d0, d, decoder):
with inf.datamodel():
z = inf.Normal(tf.ones(k), 1,name="z")
x = inf.Normal(decoder(z, d0, d), 1, name="x")
This might also have some effects on the dependencies graph: we might find the case that
a RV is "deactivated" but it has a parent and a children inside the datamodel. This might be the case of activations.
It might be interesting as well to add deactivation flag in the RV constructor.