ngraph.lstm_cell¶
- ngraph.lstm_cell(X: Union[_pyngraph.Node, int, float, numpy.ndarray], initial_hidden_state: Union[_pyngraph.Node, int, float, numpy.ndarray], initial_cell_state: Union[_pyngraph.Node, int, float, numpy.ndarray], W: Union[_pyngraph.Node, int, float, numpy.ndarray], R: Union[_pyngraph.Node, int, float, numpy.ndarray], B: Union[_pyngraph.Node, int, float, numpy.ndarray], hidden_size: int, 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) _pyngraph.Node ¶
Return a node which performs LSTMCell operation.
- Parameters
X – The input tensor with shape: [batch_size, input_size].
initial_hidden_state – The hidden state tensor with shape: [batch_size, hidden_size].
initial_cell_state – The cell state tensor with shape: [batch_size, hidden_size].
W – The weight tensor with shape: [4*hidden_size, input_size].
R – The recurrence weight tensor with shape: [4*hidden_size, hidden_size].
B – The bias tensor for gates with shape: [4*hidden_size].
hidden_size – Specifies hidden state size.
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 LSTMCell. Node outputs count: 2.