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__Softmax.html | 233 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 233 insertions(+) create mode 100644 docs/NN/html/group__Softmax.html (limited to 'docs/NN/html/group__Softmax.html') diff --git a/docs/NN/html/group__Softmax.html b/docs/NN/html/group__Softmax.html new file mode 100644 index 0000000..b8c8091 --- /dev/null +++ b/docs/NN/html/group__Softmax.html @@ -0,0 +1,233 @@ + + + + + +Softmax Functions +CMSIS-NN: Softmax Functions + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
CMSIS-NN +  Version 1.1.0 +
+
CMSIS NN Software Library
+
+
+ +
+
    + +
+
+ + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
Softmax Functions
+
+
+ + + + + + + + +

+Functions

void arm_softmax_q15 (const q15_t *vec_in, const uint16_t dim_vec, q15_t *p_out)
 Q15 softmax function. More...
 
void arm_softmax_q7 (const q7_t *vec_in, const uint16_t dim_vec, q7_t *p_out)
 Q7 softmax function. More...
 
+

Description

+

EXP(2) based softmax function

+

Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void arm_softmax_q15 (const q15_t * vec_in,
const uint16_t dim_vec,
q15_t * p_out 
)
+
+
Parameters
+ + + + +
[in]vec_inpointer to input vector
[in]dim_vecinput vector dimention
[out]p_outpointer to output vector
+
+
+
Returns
none.
+

Here, instead of typical e based softmax, we use 2-based softmax, i.e.,:

+

y_i = 2^(x_i) / sum(2^x_j)

+

The relative output will be different here. But mathematically, the gradient will be the same with a log(2) scaling factor.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void arm_softmax_q7 (const q7_t * vec_in,
const uint16_t dim_vec,
q7_t * p_out 
)
+
+
Parameters
+ + + + +
[in]vec_inpointer to input vector
[in]dim_vecinput vector dimention
[out]p_outpointer to output vector
+
+
+
Returns
none.
+

Here, instead of typical natural logarithm e based softmax, we use 2-based softmax here, i.e.,:

+

y_i = 2^(x_i) / sum(2^x_j)

+

The relative output will be different here. But mathematically, the gradient will be the same with a log(2) scaling factor.

+ +

Referenced by main().

+ +
+
+
+
+ + + + -- cgit