Skip to content

Out of Memory Error during SBC #1311

Discussion options

You must be logged in to vote

Thanks, Michael. I think the prior was already on the CPU and the method you suggested didn't solve the problem. Especially, posterior.prior.support.base_constraint.lower_bound.device was on CUDA right before run_sbc. I guess this issue happened because I only transferred the posterior_estimator with posterior.posterior_estimator = posterior.posterior_estimator.to(device). To resolve this, I replaced the prior within the posterior object with a new prior that's on the CPU, using posterior.prior = prior (is it okay to do so for diagnostics purposes after the NN training is done?).

At this point I thought everything is on the CPU. However, run_sbc gave me the same error for reduce_fns=poste…

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@ali-akhavan89
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@janfb
Comment options

@ali-akhavan89
Comment options

@janfb
Comment options

janfb Jan 2, 2025
Maintainer

Answer selected by ali-akhavan89
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