Function arm_gru_unidirectional_f16

Function Documentation

arm_cmsis_nn_status arm_gru_unidirectional_f16(const float16_t *input, float16_t *output, const cmsis_nn_gru_params_f16 *params, cmsis_nn_gru_context_f16 *buffers)

Unidirectional GRU layer for float16 input, output and state.

Implements the reset-after GRU (Keras / TFLite default) when params->reset_after is non-zero, and the pre-reset variant otherwise. The hidden state is zero-initialised for the first time step, unless buffers->hidden_state is supplied for streaming state carry (batch_size == 1), in which case it seeds the initial state and receives the final hidden state on return.

Parameters:
  • input[in] Input sequence tensor.

  • output[out] Output (hidden-state) sequence tensor.

  • params[in] Struct describing the GRU operator.

  • buffers[inout] Scratch buffers. May be NULL when reset_after != 0.

Returns:

ARM_CMSIS_NN_SUCCESS on success, ARM_CMSIS_NN_ARG_ERROR otherwise.