# How to access a layer's parameters in Flux 0.10?

**URL:** https://discourse.julialang.org/t/how-to-access-a-layers-parameters-in-flux-0-10/33201
**Category:** Machine Learning
**Created:** [January 10, 2020, 3:26pm UTC](https://discourse.julialang.org/t/how-to-access-a-layers-parameters-in-flux-0-10/33201 "2020-01-10T15:26:14Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![homocomputeris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/homocomputeris/32/8933_2.png) [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)
#### Post date: [January 10, 2020, 3:26pm UTC](https://discourse.julialang.org/t/how-to-access-a-layers-parameters-in-flux-0-10/33201/1 "2020-01-10T15:26:14Z")

</div>

In Flux 0.10 `par = params(model)` returns a Zygote.Params object, which is an iterable but not indexed.  
How to get the parameters of the 2nd layer, for example?

---

<div class="post-metadata">

### Author: ![olszewskip](https://avatars.discourse-cdn.com/v4/letter/o/f1d935/32.png) [@olszewskip](https://discourse.julialang.org/u/olszewskip)
#### Post date: [January 10, 2020, 3:30pm UTC](https://discourse.julialang.org/t/how-to-access-a-layers-parameters-in-flux-0-10/33201/2 "2020-01-10T15:30:10Z")

</div>

Maybe params(model).params is what You’re looking for? E.g.

```julia
collect(params(m).params)[2]

```

---

<div class="post-metadata">

### Author: ![homocomputeris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/homocomputeris/32/8933_2.png) [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)
#### Post date: [January 13, 2020, 9:53am UTC](https://discourse.julialang.org/t/how-to-access-a-layers-parameters-in-flux-0-10/33201/3 "2020-01-13T09:53:20Z")

</div>

```julia
par = params(mynn)
collect(par)[2]

```

works fine
