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
I'm implementing a model in which I need $f_{MLP}(z)$ in inference. As BayesianNet.query only accepts StochasticTensor, is there any way to do this, or could you consider adding this feature (e.g. by adding a deterministic StochasticTensor wrapper)? I think it's a pretty common use case.
Thanks for the awesome work!
The text was updated successfully, but these errors were encountered:
Suppose you want to perform transform on $w$, you can get the samples and log_probs of $w$ from BayesianNet.query, modify them by $f_{MLP}(z)$ defined by you own, and the use the transformed samples and log_probs in inference algorithm. Moreover, we implement the Normalizing Flow in examples/normalizing_flows, you can refer to it as examples.
@meta-inf The case is that when you do deterministic transformation, unless it's invertible (one-to-one), there is no easy way to compute the transformed probability. But getting its sample is easy. You could just return it from your model building code.
defbuild_model():
withzs.BayesianNet() asmodel:
a=zs.Normal('a')
# deterministic transform b=f(a)
returnmodel, b
Hi,
I'm implementing a model in which I need$f_{MLP}(z)$ in inference. As
BayesianNet.query
only accepts StochasticTensor, is there any way to do this, or could you consider adding this feature (e.g. by adding a deterministic StochasticTensor wrapper)? I think it's a pretty common use case.Thanks for the awesome work!
The text was updated successfully, but these errors were encountered: