Skip to content

Commit

Permalink
Adapting examples/tutorials
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldeistler committed Jul 24, 2020
1 parent a2db5df commit 7a5a625
Show file tree
Hide file tree
Showing 5 changed files with 196 additions and 51 deletions.
5 changes: 3 additions & 2 deletions sbi/examples/minimal.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import torch
from sbi.inference import infer, prepare_for_sbi, SNPE

from sbi.inference import SNPE, infer, prepare_for_sbi
from sbi.simulators.linear_gaussian import diagonal_linear_gaussian


Expand Down Expand Up @@ -33,7 +34,7 @@ def flexible():
)
simulator, prior = prepare_for_sbi(diagonal_linear_gaussian, prior)
inference = SNPE(simulator, prior)
posterior = inference(num_rounds=1, num_simulations_per_round=500)
posterior = inference(num_simulations=500)
posterior.sample((100,), x=x_o)

return posterior
Expand Down
79 changes: 73 additions & 6 deletions tutorial/00_getting_started.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit 7a5a625

Please sign in to comment.