CMSIS-NN
CMSIS NN Software Library
|
Functions | |
arm_cmsis_nn_status | arm_softmax_s16 (const int16_t *input, const int32_t num_rows, const int32_t row_size, const int32_t mult, const int32_t shift, const cmsis_nn_softmax_lut_s16 *softmax_params, int16_t *output) |
S16 softmax function. More... | |
void | arm_softmax_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, int8_t *output) |
S8 softmax function. More... | |
void | arm_softmax_s8_s16 (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, int16_t *output) |
S8 to s16 softmax function. More... | |
void | arm_softmax_u8 (const uint8_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, uint8_t *output) |
U8 softmax function. More... | |
arm_cmsis_nn_status arm_softmax_s16 | ( | const int16_t * | input, |
const int32_t | num_rows, | ||
const int32_t | row_size, | ||
const int32_t | mult, | ||
const int32_t | shift, | ||
const cmsis_nn_softmax_lut_s16 * | softmax_params, | ||
int16_t * | output | ||
) |
[in] | input | Pointer to the input tensor |
[in] | num_rows | Number of rows in the input tensor |
[in] | row_size | Number of elements in each input row |
[in] | mult | Input quantization multiplier |
[in] | shift | Input quantization shift within the range [0, 31] |
[in] | softmax_params | Softmax s16 layer parameters with two pointers to LUTs speficied below. For indexing the high 9 bits are used and 7 remaining for interpolation. That means 512 entries for the 9-bit indexing and 1 extra for interpolation, i.e. 513 values for each LUT.
|
[out] | output | Pointer to the output tensor |
ARM_CMSIS_NN_ARG_ERROR
Argument error check failed ARM_CMSIS_NN_SUCCESS
- Successful operationvoid arm_softmax_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, | ||
int8_t * | output | ||
) |
[in] | input | Pointer to the input tensor |
[in] | num_rows | Number of rows in the input tensor |
[in] | row_size | Number of elements in each input row |
[in] | mult | Input quantization multiplier |
[in] | shift | Input quantization shift within the range [0, 31] |
[in] | diff_min | Minimum difference with max in row. Used to check if the quantized exponential operation can be performed |
[out] | output | Pointer to the output tensor |
void arm_softmax_s8_s16 | ( | 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, | ||
int16_t * | output | ||
) |
[in] | input | Pointer to the input tensor |
[in] | num_rows | Number of rows in the input tensor |
[in] | row_size | Number of elements in each input row |
[in] | mult | Input quantization multiplier |
[in] | shift | Input quantization shift within the range [0, 31] |
[in] | diff_min | Minimum difference with max in row. Used to check if the quantized exponential operation can be performed |
[out] | output | Pointer to the output tensor |
void arm_softmax_u8 | ( | const uint8_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, | ||
uint8_t * | output | ||
) |
[in] | input | Pointer to the input tensor |
[in] | num_rows | Number of rows in the input tensor |
[in] | row_size | Number of elements in each input row |
[in] | mult | Input quantization multiplier |
[in] | shift | Input quantization shift within the range [0, 31] |
[in] | diff_min | Minimum difference with max in row. Used to check if the quantized exponential operation can be performed |
[out] | output | Pointer to the output tensor |