Skip to content

Commit

Permalink
small fixes to stackdernn
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinuzziFrancesco committed Dec 21, 2024
1 parent 39339d5 commit 13fbb03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wrappers/stackedrnn.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ struct StackedRNN{L,D,S}
states::S
end

Flux.@layer StackedRNN
Flux.@layer StackedRNN trainable=(layers)

"""
StackedRNN(rlayer, (input_size, hidden_size), args...;
Expand Down Expand Up @@ -40,7 +40,7 @@ function StackedRNN(rlayer, (input_size, hidden_size)::Pair, args...;
return StackedRNN(layers, Dropout(dropout), states)
end

function (stackedrnn::StackedRNN)(inp::AbstracArray)
function (stackedrnn::StackedRNN)(inp::AbstractArray)
for (idx,(layer, state)) in enumerate(zip(stackedrnn.layers, stackedrnn.states))
inp = layer(inp, state0)
if !(idx == length(stackedrnn.layers))
Expand Down

0 comments on commit 13fbb03

Please sign in to comment.