Skip to content

Commit

Permalink
Clarify last round behavior of SNPE-A
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldeistler committed Dec 6, 2024
1 parent 4b3d409 commit 706c183
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tutorials/16_implemented_methods.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,11 @@
"\n",
"inference = NPE_A(prior)\n",
"proposal = prior\n",
"for _ in range(num_rounds):\n",
"for r in range(num_rounds):\n",
" theta = proposal.sample((num_sims,))\n",
" x = simulator(theta)\n",
" _ = inference.append_simulations(theta, x, proposal=proposal).train()\n",
" final_round = True if r == num_rounds - 1 else False\n",
" _ = inference.append_simulations(theta, x, proposal=proposal).train(final_round=final_round)\n",
" posterior = inference.build_posterior().set_default_x(x_o)\n",
" proposal = posterior"
]
Expand Down Expand Up @@ -598,7 +599,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.14"
"version": "3.12.4"
},
"toc": {
"base_numbering": 1,
Expand Down

0 comments on commit 706c183

Please sign in to comment.