Is it possible to use SNLE with multi-dimensional/image data? #967
-
I'd like to implement neural variational inference (NVI) via the SNLE approach listed here. However, my data is gridded (an image), and so I receive the error message:
The error is clear, but I wanted to double check that I'm not missing something. Are there any workarounds (like |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi @msainsburydale, SNLE does not allow the use of embedding nets for x because it learns a density in x. It can only embed the parameters theta. Is there a specific reason you want to use NVI? If not you could just use NPE which directly learns the posterior and allows embeddings in x. NPE is also fully amortized, i.e., after training you can obtain posterior estimates instantly without having to run VI or MCMC. Alternatively, you could use NRE which allows to embed both, theta and x. With NRE you could then use VI or MCMC to obtain posterior samples. I hope this helps. |
Beta Was this translation helpful? Give feedback.
Hi @msainsburydale, SNLE does not allow the use of embedding nets for x because it learns a density in x. It can only embed the parameters theta.
Is there a specific reason you want to use NVI? If not you could just use NPE which directly learns the posterior and allows embeddings in x. NPE is also fully amortized, i.e., after training you can obtain posterior estimates instantly without having to run VI or MCMC.
Alternatively, you could use NRE which allows to embed both, theta and x. With NRE you could then use VI or MCMC to obtain posterior samples.
I hope this helps.
Best,
Jan