Closed felipeangelimvieira closed 2 months ago
This is expected. obs_mask
introduces a local latent variable named foo_unobserved
whose distribution will be inferred by SVI. Assume that you have a model $x_n \to z_n \to y_n$ and you use autoguide to approximate $p(z_n | x_n, y_n)$. Such information does not allow you to make prediction $p(z'_n | x'_n)$. Instead, you might want to construct a custom guide for $q(z | x)$.
Oh I see, thank you for the explanation! I think I could use mask
handler directly.
First of all, thank you for this amazing library.
I've found that
Predictive
raises an unexpected error when using obs_mask. It happens when a certain shape is passed during SVI inference, but another is used in predictive, maybe related to pyro-ppl/numpyro#1772.Here it is a code to reproduce it: