How to retrive input values from Flux Dense layer

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 “” but does not work.


using Flux

layer = Dense(1,2,relu)

layer.σ #??

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.

1 Like

Thank you!!