flare.rnn
build-seq
(build-seq cell inputs)
(build-seq cell inputs bidrectional?)
return sequence of add-input
outputs for a given RNNCell
and sequence of inputs
. Can optionally make sequence building bidrectional using bidirectional?
optional third argument.
Returned sequence will drop the init-hidden
element which doesn’t correspond to an input.
lstm-cell
(lstm-cell model input-dim hidden-dim)
Standard LSTM cell https://en.wikipedia.org/wiki/Long_short-term_memory without any peepholes or other adaptations.
The hidden state is a piar (output, cell-state)
RNNCell
protocol
members
add-input
(add-input this input last-hidden)
take last hidden and reutrn new hidden
cell-model
(cell-model this)
return model underlying cell
input-dim
(input-dim this)
dimension of inputs
output-dim
(output-dim this)
output dimension of cell