You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If control of the initial states is also needed, define a custom struct:
struct StackedRNN{L,S}
layers::L
states0::SendfunctionStackedRNN(d, num_layers)
layers = [LSTM(d => d) for _ in num_layers]
states0 = [Flux.initialstates(l) for l in layers]
returnStackedRNN(layers, states0)
endfunction (m::StackedRNN)(x)
for (layer, state0) inzip(rnn.layers, rnn.states0)
x =layer(x, state)
endreturn x
end
Motivation and description
How to build Stacked RNN in Flux.jl?
Is the following code the correct way?
There is no documentation mentioning this.
Possible Implementation
No response
The text was updated successfully, but these errors were encountered: