how to use NStepLSTM or BiNStepLSTM? I see reference it must supply argument as list of variables, what is this list?
How to use it to composite of other layer Link??
NStepLSTM assumes that the inputs are a minibatch of sequences that may have different lengths. The input is a list of these sequences. Each sequence is represented by a variable of shape (T, D)
, where T
is the length of the sequence and D
is the dimensionality of each item in the sequence (if you are dealing with text data, D
can be the dimensionality of the embedding layer).
Then, the NStepLSTM.__call__
returns a tuple of three: final hidden states, final cell states, and the output sequences in a similar format as the input sequences (a list of variables). You can combine it with other functions or links. For example, you can pass each variable in the output sequences to some loss function to get a loss.