Versioned name: LSTMSequence-1
Category: Sequence processing
Short description: LSTMSequence operation represents a series of LSTM cells. Each cell is implemented as LSTMCell operation.
Detailed description
A single cell in the sequence is implemented in the same way as in LSTMCell operation. LSTMSequence represents a sequence of LSTM cells. The sequence can be connected differently depending on direction
attribute that specifies the direction of traversing of input data along sequence dimension or specifies whether it should be a bidirectional sequence. The most of the attributes are in sync with the specification of ONNX LSTM operator defined LSTMCell.
Attributes
int
float[]
float
num_directions = 1
, if it is bidirectional, then num_directions = 2
. This num_directions
value specifies input/output shape requirements.string
Inputs
X
- 3D ([batch_size, seq_length, input_size]) input data. It differs from LSTMCell 1st input only by additional axis with size seq_length
. Floating point type. Required.initial_hidden_state
- 3D ([batch_size, num_directions, hidden_size]) input hidden state data. Floating point type. Required.initial_cell_state
- 3D ([batch_size, num_directions, hidden_size]) input cell state data. Floating point type. Required.sequence_lengths
- 1D ([batch_size]) specifies real sequence lengths for each batch element. Integer type. Required.W
- 3D tensor with weights for matrix multiplication operation with input portion of data, shape is [num_directions, 4 * hidden_size, input_size]
, output gate order: fico. Floating point type. Required.R
- 3D tensor with weights for matrix multiplication operation with hidden state, shape is [num_directions, 4 * hidden_size, hidden_size]
, output gate order: fico. Floating point type. Required.B
- 2D tensor with biases, shape is [num_directions, 4 * hidden_size]
. Floating point type. Required.Outputs
Y
– 3D output, shape [batch_size, num_directions, seq_len, hidden_size]Ho
- 3D ([batch_size, num_directions, hidden_size]) output hidden state.Co
- 3D ([batch_size, num_directions, hidden_size]) output cell state.