GRU

Description

Calculate the single-layer GRU.

Input

Three to six inputs:

x: tensor of type float16.

w: tensor of type float16.

r: tensor of type float16.

b: (optional) tensor of type float16.

sequence_lens: (optional) tensor of type int32.

initial_h: (optional) tensor of type float16.

Output

Two outputs:

y: tensor of type float16.

y_h: tensor of type float16.

Property

activation_alpha: list of floats: optional scaling value used by the activation function, for example, (f, g, h) in LSTM. The default value is the same as that of ONNX. For LeakyRelu, the default alpha value is 0.01.

activation_beta: list of floats, optional scaling value used by the activation function, for example, (f, g, h) in LSTM. The default value is the same as that of ONNX.

activations: list of strings, used to update, reset, and hide the gates (if bidirectional) activation function list. The activation function must be one of the activation functions specified above.

clip: float, unit clip threshold.

direction: string (default is forward), specifying whether the RNN is forward, reverse, or bidirectional. The value must be Forward (default), Reverse, or Bidirectional.

hidden_size: int, number of neurons at the hidden layer.

linear_before_reset: int (default=0). When the output of hidden gates is computed, linear transformation is applied before the output of the reset gate is multiplied.

ONNX Opset Support

Opset v8/v9/v10/v11/v12/v13/v14/v15/v16/v17/v18