From 13fbb039280924f35e8c4afffbb9dc149e87548a Mon Sep 17 00:00:00 2001 From: MartinuzziFrancesco Date: Sat, 21 Dec 2024 19:19:28 +0100 Subject: [PATCH] small fixes to stackdernn --- src/wrappers/stackedrnn.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wrappers/stackedrnn.jl b/src/wrappers/stackedrnn.jl index 4782754..9f0a05f 100644 --- a/src/wrappers/stackedrnn.jl +++ b/src/wrappers/stackedrnn.jl @@ -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...; @@ -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))