Skip to content

Commit

Permalink
Documentation for learning the initial state.
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhevg authored and Evgeny Tankhilevich committed Sep 6, 2019
1 parent 3fb1e4e commit d19988f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/src/models/recurrence.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,11 @@ function loss(x,y)
return l
end
```

## Learning the Initial State

By default, the hidden state of RNN cells is initialised to zero, and is reset to zero every time `Flux.reset!` is called. Some models treat this initial state as a learnable parameter, which must be optimised during training. For such models, *learn_initial_state!* must be invoked:

```julia
Flux.learn_initial_state!(m)
```

0 comments on commit d19988f

Please sign in to comment.