From 9f95ff5b6ba01db09552b84a0ab79607060a2666 Mon Sep 17 00:00:00 2001 From: Ali Labbene Date: Wed, 11 Dec 2019 08:59:21 +0100 Subject: Official ARM version: v5.4.0 Add CMSIS V5.4.0, please refer to index.html available under \docs folder. Note: content of \CMSIS\Core\Include has been copied under \Include to keep the same structure used in existing projects, and thus avoid projects mass update Note: the following components have been removed from ARM original delivery (as not used in ST packages) - CMSIS_EW2018.pdf - .gitattributes - .gitignore - \Device - \CMSIS - \CoreValidation - \DAP - \Documentation - \DoxyGen - \Driver - \Pack - \RTOS\CMSIS_RTOS_Tutorial.pdf - \RTOS\RTX - \RTOS\Template - \RTOS2\RTX - \Utilities - All ARM/GCC projects files are deleted from \DSP, \RTOS and \RTOS2 Change-Id: Ia026c3f0f0d016627a4fb5a9032852c33d24b4d3 --- docs/NN/html/group__GRUExample.html | 162 ++++++++++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 docs/NN/html/group__GRUExample.html (limited to 'docs/NN/html/group__GRUExample.html') diff --git a/docs/NN/html/group__GRUExample.html b/docs/NN/html/group__GRUExample.html new file mode 100644 index 0000000..57739b2 --- /dev/null +++ b/docs/NN/html/group__GRUExample.html @@ -0,0 +1,162 @@ + + + + + +Gated Recurrent Unit Example +CMSIS-NN: Gated Recurrent Unit Example + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
CMSIS-NN +  Version 1.1.0 +
+
CMSIS NN Software Library
+
+
+ +
+
    + +
+
+ + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
Gated Recurrent Unit Example
+
+
+
Description:
+
Demonstrates a gated recurrent unit (GRU) example with the use of fully-connected, Tanh/Sigmoid activation functions.
+
Model definition:
+
GRU is a type of recurrent neural network (RNN). It contains two sigmoid gates and one hidden state.
+
The computation can be summarized as:
z[t] = sigmoid( W_z ⋅ {h[t-1],x[t]} )
+r[t] = sigmoid( W_r ⋅ {h[t-1],x[t]} ) 
+n[t] = tanh( W_n ⋅ [r[t] × {h[t-1], x[t]} ) 
+h[t] = (1 - z[t]) × h[t-1] + z[t] × n[t] 
+GRU.gif +
+Gate Recurrent Unit Diagram
+
+
Variables Description:
+
    +
  • update_gate_weights, reset_gate_weights, hidden_state_weights are weights corresponding to update gate (W_z), reset gate (W_r), and hidden state (W_n).
  • +
  • update_gate_bias, reset_gate_bias, hidden_state_bias are layer bias arrays
  • +
  • test_input1, test_input2, test_history are the inputs and initial history
  • +
+
+
The buffer is allocated as:
+
| reset | input | history | update | hidden_state |
+
In this way, the concatination is automatically done since (reset, input) and (input, history) are physically concatinated in memory.
+
The ordering of the weight matrix should be adjusted accordingly.
+
CMSIS DSP Software Library Functions Used:
+
+
+

Refer arm_nnexamples_gru.cpp

+
+
+ + + + -- cgit