# Problem with BayesNN Demo in Turing.jl

**URL:** <https://discourse.julialang.org/t/problem-with-bayesnn-demo-in-turing-jl/58293>\
**Category:** New to Julia\
**Created:** [March 31, 2021, 1:11pm UTC](https://discourse.julialang.org/t/problem-with-bayesnn-demo-in-turing-jl/58293 "2021-03-31T13:11:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![erlebach1](https://avatars.discourse-cdn.com/v4/letter/e/ed655f/32.png) [@erlebach1](https://discourse.julialang.org/u/erlebach1)\
**Post date:** [March 31, 2021, 1:11pm UTC](https://discourse.julialang.org/t/problem-with-bayesnn-demo-in-turing-jl/58293/1 "2021-03-31T13:11:43Z")

</div>

Hi,

When running the BayesNN demo in Turing, I get the error that `index nn_params` not found. After checking the code, I found the line:

```julia
theta = ch[:nn_params].value.data;

```

and I do not see where `:nn_params` is defined earlier on. I am using Julia 1.6 . The example I am running can be found at [https://turing.ml/dev/tutorials/3-bayesnn/](https://turing.ml/dev/tutorials/3-bayesnn/).  
Thanks for any insight you might provide! Gordon.

---

<div class="post-metadata">

**Author:** ![anon20242138](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@anon20242138](https://discourse.julialang.org/u/anon20242138)\
**Post date:** [May 15, 2021, 2:05pm UTC](https://discourse.julialang.org/t/problem-with-bayesnn-demo-in-turing-jl/58293/3 "2021-05-15T14:05:12Z")

</div>

This code is wrong. It may be “official wrong”.  
Replace it to ` theta = group(ch, :nn_params).value.data`; .
