openvino.runtime.opset12.gru_sequence(X: Node | int | float | ndarray, initial_hidden_state: Node | int | float | ndarray, sequence_lengths: Node | int | float | ndarray, W: Node | int | float | ndarray, R: Node | int | float | ndarray, B: Node | int | float | ndarray, hidden_size: int, direction: str, activations: List[str] | None = None, activations_alpha: List[float] | None = None, activations_beta: List[float] | None = None, clip: float = 0.0, linear_before_reset: bool = False, name: str | None = None) Node#

Return a node which performs GRUSequence operation.

  • inputs – The input tensor. Shape: [batch_size, seq_length, input_size].

  • initial_hidden_state – The hidden state tensor. Shape: [batch_size, num_directions, hidden_size].

  • sequence_lengths – Specifies real sequence lengths for each batch element. Shape: [batch_size]. Integer type.

  • weights_w – Tensor with weights for matrix multiplication operation with input portion of data. Shape: [num_directions, 3*hidden_size, input_size].

  • weights_r – The tensor with weights for matrix multiplication operation with hidden state. Shape: [num_directions, 3*hidden_size, hidden_size].

  • biases – The sum of biases (weight and recurrence). For linear_before_reset set True the shape is [num_directions, 4*hidden_size]. Otherwise the shape is [num_directions, 3*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.

  • linear_before_reset – Flag denotes if the layer behaves according to the modification of GRU described in the formula in the ONNX documentation.

  • name – An optional name of the output node.


The new node represents GRUSequence. Node outputs count: 2.