Hi,
I have a parameter vector and shape array as below:
shape =[((2,5),2),((2,2),2)] #shape of layers : weights and bias
w = rand(18) #weights and bias together.
In this case elements of w
are divided as below:
- First 10 elements of
w
are weights of layer 1 - Next 2 elements of
w
are bias of layer 1 - First 4elements of
w
are weights of layer 2 - Next 2 elements of
w
are bias of layer 2
What will be the best way to create a Flux model using like below using elements of w
Chain(Dense(5,2), Dense(2,2))
Thanks and Regards
Manu
4 posts - 3 participants