LSTM¶
- class
dragon.nn.
LSTM
(
input_size,
hidden_size,
num_layers=1,
bidirectional=False,
dropout=0,
**kwargs
)[source]¶ Apply a multi-layer long short-term memory (LSTM) RNN. [Hochreiter & Schmidhuber, 1997].
The data format of inputs should be :
__init__¶
LSTM.
__init__
(
input_size,
hidden_size,
num_layers=1,
bidirectional=False,
dropout=0,
**kwargs
)[source]¶Create a
LSTM
module.- Parameters:
- input_size (int) – The dimension of input.
- hidden_size (int) – The dimension of hidden state.
- num_layers (int, optional, default=1) – The number of recurrent layers.
- bidirectional (bool, optional, default=False) – Whether to create a bidirectional lstm.
- dropout (number, optional, default=0) – The dropout ratio.