Skip to content

Truncated proposals for SNPE (TSNPE) implementation #1354

Answered by janfb
ali-akhavan89 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @ali-akhavan89

in general, when you sample from the posterior that uses a large embedding net / is conditioned on large data, it will generate samples through forward passes through the underlying embedding net and density estimator. Thus, the custom embedding net will always be used. If you draw 1,000,000 samples, these samples will be accumulated on the GPU, which is likely the cause for the out of memory error. Thus, if you really need that many samples, a workaround would be using a for-loop to draw 10 x 100,000 samples, or 100 x 10,000 samples etc. and moving the individual batches to CPU in each iteration.

Regarding the device mismatch error after moving the posterior estimator t…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by janfb
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants