Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinuzziFrancesco committed Jan 21, 2025
1 parent 9b9a12b commit 0c5f930
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/generics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,21 @@ end
function (rlayer::AbstractRecurrentLayer{false})(inp::AbstractArray,
state::Union{AbstractVecOrMat, Tuple{AbstractVecOrMat, AbstractVecOrMat}})
@assert ndims(inp) == 2 || ndims(inp) == 3
@assert typeof(state) == typeof(initialstates(rlayer)) """\n
The layer $rlayer is calling states not supported by its
forward method. Check if this is a single or double return
recurrent layer, and adjust your inputs accordingly.
"""
@assert typeof(state)==typeof(initialstates(rlayer)) """\n
The layer $rlayer is calling states not supported by its
forward method. Check if this is a single or double return
recurrent layer, and adjust your inputs accordingly.
"""
return first(scan(rlayer.cell, inp, state))
end

function (rlayer::AbstractRecurrentLayer{true})(inp::AbstractArray,
state::Union{AbstractVecOrMat, Tuple{AbstractVecOrMat, AbstractVecOrMat}})
@assert ndims(inp) == 2 || ndims(inp) == 3
@assert typeof(state) == typeof(initialstates(rlayer)) """\n
The layer $rlayer is calling states not supported by its
forward method. Check if this is a single or double return
recurrent layer, and adjust your inputs accordingly.
"""
@assert typeof(state)==typeof(initialstates(rlayer)) """\n
The layer $rlayer is calling states not supported by its
forward method. Check if this is a single or double return
recurrent layer, and adjust your inputs accordingly.
"""
return scan(rlayer.cell, inp, state)
end

0 comments on commit 0c5f930

Please sign in to comment.