openvino.runtime.opset3.lstm_sequence¶
- openvino.runtime.opset3.lstm_sequence(X: Union[openvino._pyopenvino.Node, int, float, numpy.ndarray], initial_hidden_state: Union[openvino._pyopenvino.Node, int, float, numpy.ndarray], initial_cell_state: Union[openvino._pyopenvino.Node, int, float, numpy.ndarray], sequence_lengths: Union[openvino._pyopenvino.Node, int, float, numpy.ndarray], W: Union[openvino._pyopenvino.Node, int, float, numpy.ndarray], R: Union[openvino._pyopenvino.Node, int, float, numpy.ndarray], B: Union[openvino._pyopenvino.Node, int, float, numpy.ndarray], hidden_size: int, direction: str, activations: Optional[List[str]] = None, activations_alpha: Optional[List[float]] = None, activations_beta: Optional[List[float]] = None, clip: float = 0.0, name: Optional[str] = None) openvino._pyopenvino.Node ¶
Return a node which performs LSTMSequence operation.
- Parameters
X – The input tensor. Shape: [batch_size, seq_length, input_size].
initial_hidden_state – The hidden state tensor. Shape: [batch_size, num_directions, hidden_size].
initial_cell_state – The cell state tensor. Shape: [batch_size, num_directions, hidden_size].
sequence_lengths – Specifies real sequence lengths for each batch element. Shape: [batch_size]. Integer type.
W – Tensor with weights for matrix multiplication operation with input portion of data. Shape: [num_directions, 4*hidden_size, input_size].
R – The tensor with weights for matrix multiplication operation with hidden state. Shape: [num_directions, 4*hidden_size, hidden_size].
B – The tensor with biases. Shape: [num_directions, 4*hidden_size].
hidden_size – Specifies hidden state size.
direction – Specifies if the RNN is forward, reverse, or bidirectional.
activations – The list of three activation functions for gates.
activations_alpha – The list of alpha parameters for activation functions.
activations_beta – The list of beta parameters for activation functions.
clip – Specifies bound values [-C, C] for tensor clipping performed before activations.
name – An optional name of the output node.
- Returns
The new node represents LSTMSequence. Node outputs count: 3.