LIBML Version 4.1.9
LIBML NN Software Library
Loading...
Searching...
No Matches
Softmax

Functions

void tpt_softmax_s8_hp (int8_t *aOut_tensor, const int8_t *aIn_tensor, const int32_t in_tensor_row, const int32_t in_tensor_col, const int32_t mult, const int32_t lshift, const int32_t diff_min)
 This is a softmax function for signed 8-bit integer input/output tensor with high precision algorithm.
void tpt_softmax_u8_hp (uint8_t *aOut_tensor, const uint8_t *aIn_tensor, const int32_t aIn_tensor_row, const int32_t aIn_tensor_col, const int32_t scale, const int32_t left_shift, const int32_t diff_min)

Detailed Description

Function Documentation

◆ tpt_softmax_s8_hp()

void tpt_softmax_s8_hp ( int8_t * aOut_tensor,
const int8_t * aIn_tensor,
const int32_t in_tensor_row,
const int32_t in_tensor_col,
const int32_t mult,
const int32_t lshift,
const int32_t diff_min )

This is a softmax function for signed 8-bit integer input/output tensor with high precision algorithm.

Parameters
aOut_tensorpointer of the output tensor
aIn_tensorpointer of the input tensor
in_tensor_rownumber of rows in the input tensor
in_tensor_colnumber of columns in the input tensor
multscaling value for input quantization
lshiftleft shift amount for input quantization
diff_minminimum threshold to perform the quantized exponential operation. The difference can be obtained by subtracting the input from the maximum in row.
Returns
None

◆ tpt_softmax_u8_hp()

void tpt_softmax_u8_hp ( uint8_t * aOut_tensor,
const uint8_t * aIn_tensor,
const int32_t aIn_tensor_row,
const int32_t aIn_tensor_col,
const int32_t scale,
const int32_t left_shift,
const int32_t diff_min )