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

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?

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

collect(params(m).params)[2]
1 Like
par = params(mynn)
collect(par)[2]

works fine