This commit is contained in:
Mike J Innes 2017-10-16 08:53:39 +01:00
parent 9a155abecd
commit d3db051ca0

View File

@ -27,6 +27,8 @@ _truncate(x::Tuple) = _truncate.(x)
truncate!(m) = foreach(truncate!, children(m))
truncate!(m::Recur) = (m.state = _truncate(m.state))
flip(f, xs) = reverse(f.(reverse(xs)))
# Vanilla RNN
struct RNNCell{D,V}