Is it possible to continue training on top of an already saved posterior? #869
|
For example, say I used |
Answered by
michaeldeistler
Aug 5, 2023
Replies: 1 comment
|
Please use the flexible interface for that. from sbi.inference import SNPE, prepare_for_sbi, simulate_for_sbi
simulator, prior = prepare_for_sbi(simulator, prior)
inference = SNPE(prior)
theta, x = simulate_for_sbi(simulator, proposal=prior, num_simulations=1000)
# ==== This is where you want to save the simulations (e.g. with pickle) and load them next time
density_estimator = inference.append_simulations(theta, x).train()
posterior = inference.build_posterior(density_estimator) |
0 replies
Answer selected by
janfb
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please use the flexible interface for that.