Slight modifications in recurrent docstrings

This commit is contained in:
janEbert 2019-10-24 22:35:59 +02:00
parent 3b913cd501
commit aaa0a82b74

View File

@ -47,9 +47,10 @@ Base.show(io::IO, m::Recur) = print(io, "Recur(", m.cell, ")")
Reset the hidden state of a recurrent layer back to its original value.
Assuming you have a `Recur` layer `rnn`, this is roughly equivalent to
Assuming you have a `Recur` layer `rnn`, this is roughly equivalent to:
```
rnn.state = hidden(rnn.cell)
```
"""
reset!(m::Recur) = (m.state = m.init)
reset!(m) = foreach(reset!, functor(m)[1])