Struct cmsis_nn_gru_context_f32

Struct Documentation

struct cmsis_nn_gru_context_f32

Scratch buffers for a float32 GRU invocation.

Note

temp1 is sized by arm_gru_unidirectional_f32_temp1_get_buffer_size(): hidden_size elements when reset_after == 0 (it holds the reset gate multiplied elementwise by the previous hidden state, r . h_prev). It is unused for the reset-after formulation and may be NULL there. There is no size field and no runtime enforcement: an undersized temp1 is written past on every build target.

Note

hidden_state enables streaming state carry (batch_size == 1): when non-NULL it is read as the initial hidden state (seed to zero for a fresh sequence) and overwritten with the final hidden state on return. When NULL the state is zero-initialised and not written back.

Public Members

float32_t *temp1

Scratch required when reset_after == 0; sized by arm_gru_unidirectional_f32_temp1_get_buffer_size().

float32_t *hidden_state

Optional in/out persistent hidden state [hidden_size] for streaming (batch_size == 1).