Skip to content

Commit

Permalink
Use Mooncake in BNN doc (#521)
Browse files Browse the repository at this point in the history
  • Loading branch information
penelopeysm committed Nov 25, 2024
1 parent aca574f commit 28fcc61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tutorials/03-bayesian-neural-network/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ using Turing
using FillArrays
using Lux
using Plots
using Tracker
import Mooncake
using Functors
using LinearAlgebra
Expand Down Expand Up @@ -208,7 +208,7 @@ setprogress!(false)
```{julia}
# Perform inference.
N = 2_000
ch = sample(bayes_nn(reduce(hcat, xs), ts), NUTS(; adtype=AutoTracker()), N);
ch = sample(bayes_nn(reduce(hcat, xs), ts), NUTS(; adtype=AutoMooncake(; config=nothing)), N);
```

Now we extract the parameter samples from the sampled chain as `θ` (this is of size `5000 x 20` where `5000` is the number of iterations and `20` is the number of parameters).
Expand Down

0 comments on commit 28fcc61

Please sign in to comment.