NMSIS-NN  Version 1.2.0
NMSIS NN Software Library
Softmax

Support functions for Softmax. More...

Functions

void riscv_nn_softmax_common_s8 (const int8_t *input, const int32_t num_rows, const int32_t row_size, const int32_t mult, const int32_t shift, const int32_t diff_min, const bool int16_output, void *output)
 Common softmax function for s8 input and s8 or s16 output. More...
 

Detailed Description

Support functions for Softmax.

Function Documentation

◆ riscv_nn_softmax_common_s8()

void riscv_nn_softmax_common_s8 ( const int8_t *  input,
const int32_t  num_rows,
const int32_t  row_size,
const int32_t  mult,
const int32_t  shift,
const int32_t  diff_min,
const bool  int16_output,
void *  output 
)

Common softmax function for s8 input and s8 or s16 output.

Parameters
[in]inputPointer to the input tensor
[in]num_rowsNumber of rows in the input tensor
[in]row_sizeNumber of elements in each input row
[in]multInput quantization multiplier
[in]shiftInput quantization shift within the range [0, 31]
[in]diff_minMinimum difference with max in row. Used to check if the quantized exponential operation can be performed
[in]int16_outputIndicating s8 output if 0 else s16 output
[out]outputPointer to the output tensor
Note
Supported framework: TensorFlow Lite micro (bit-accurate)