# How to retrive input values from Flux Dense layer

**URL:** https://discourse.julialang.org/t/how-to-retrive-input-values-from-flux-dense-layer/88142
**Category:** General Usage
**Tags:** flux
**Created:** [October 3, 2022, 4:14am UTC](https://discourse.julialang.org/t/how-to-retrive-input-values-from-flux-dense-layer/88142 "2022-10-03T04:14:35Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Molox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/molox/32/35002_2.png) [@Molox](https://discourse.julialang.org/u/Molox)
#### Post date: [October 3, 2022, 4:14am UTC](https://discourse.julialang.org/t/how-to-retrive-input-values-from-flux-dense-layer/88142/1 "2022-10-03T04:14:35Z")

</div>

Hi, I was loading many Flux models (bson file) and had no idea about the layer information.  
I am able to find the activation function by calling the field “σ”.

I searched around but just could not find the field name to get the input and output size as a variable. I was expecting “layer.in” but does not work.

Thanks!!

```julia
using Flux

layer = Dense(1,2,relu)

layer.σ

#layer.in #??

```

---

<div class="post-metadata">

### Author: ![albheim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/albheim/32/34660_2.png) [@albheim](https://discourse.julialang.org/u/albheim)
#### Post date: [October 3, 2022, 6:50am UTC](https://discourse.julialang.org/t/how-to-retrive-input-values-from-flux-dense-layer/88142/2 "2022-10-03T06:50:34Z")

</div>

Seems to be `layer.weight` to access the weight matrix, where the first dimension of that matrix is the output size and the second dimension is the input size.

> <https://github.com/FluxML/Flux.jl/blob/9a8a676e81de4b3b47fd78b9c04b2cf4e16f20c6/src/layers/basic.jl#L153-L161>

---

<div class="post-metadata">

### Author: ![Molox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/molox/32/35002_2.png) [@Molox](https://discourse.julialang.org/u/Molox)
#### Post date: [October 3, 2022, 5:34pm UTC](https://discourse.julialang.org/t/how-to-retrive-input-values-from-flux-dense-layer/88142/3 "2022-10-03T17:34:40Z")

</div>

Thank you!!
