![]() |
LIBML Version 4.1.9
LIBML NN Software Library
|
Functions | |
| void | tpt_leaky_relu_q7 (q7_t *__restrict aOutData, const q7_t *__restrict aInData, q15_t slop, uint16_t aCount) |
| Q7 LEAKY RELU function. | |
| void | tpt_nn_activation_q15 (q15_t *__restrict aOutData, const q15_t *__restrict aInData, uint16_t aCount, const uint16_t int_bits, const tpt_nn_activation_type type) |
| Neural network activation function using direct table look-up. | |
| void | tpt_nn_activation_q7 (q7_t *__restrict aOutData, const q7_t *__restrict aInData, uint32_t aCount, const uint16_t int_bits, const tpt_nn_activation_type type) |
| q7_t neural network activation function using direct table look-up | |
| int32_t | tpt_nn_tanh_f32 (f32_t *aOutData, const f32_t *aInData, uint32_t aCount) |
| F32_t TANH function. | |
| void | tpt_relu_any_q7 (q7_t *aInData, const q7_t upper_bound, uint32_t aCount) |
| Q7 RELU function. | |
| void | tpt_relu_any_q7_buf (q7_t *aOutData, const q7_t *aInData, const q7_t upper_bound, uint32_t aCount) |
| Q7 RELU function. | |
| void | tpt_relu_q15 (q15_t *aInData, uint16_t aCount) |
| Q15 ReLu function. | |
| void | tpt_relu_q7 (q7_t *aInData, uint16_t aCount) |
| Q7 ReLu function. | |
Variables | |
| const f32_t | CONST_MIN_TANH = -10.f |
| const f32_t | CONST_MAX_TANH = 10.f |
| const f32_t | CONST_THR = 5.e-3 |
| const f32_t | CONST_1_3 = 0.3333333f |
| void tpt_leaky_relu_q7 | ( | q7_t *__restrict | aOutData, |
| const q7_t *__restrict | aInData, | ||
| q15_t | slop, | ||
| uint16_t | aCount ) |
Q7 LEAKY RELU function.
| [out] | aOutData | pointer to output |
| [in] | aInData | pointer to input |
| [in] | slop | slope value to be multiplied with the negative inputs. The result will be right shifted 15 bits |
| [in] | aCount | number of elements |
| void tpt_nn_activation_q15 | ( | q15_t *__restrict | aOutData, |
| const q15_t *__restrict | aInData, | ||
| uint16_t | aCount, | ||
| const uint16_t | int_bits, | ||
| const tpt_nn_activation_type | type ) |
Neural network activation function using direct table look-up.
q15_t neural network activation function using direct table look-up
| void tpt_nn_activation_q7 | ( | q7_t *__restrict | aOutData, |
| const q7_t *__restrict | aInData, | ||
| uint32_t | aCount, | ||
| const uint16_t | int_bits, | ||
| const tpt_nn_activation_type | type ) |
q7_t neural network activation function using direct table look-up
| [out] | aOutData | pointer to output |
| [in] | aInDara | pointer to input data |
| [in] | aCount | number of elements |
| [in] | int_bits | bit-width of the integer part, assume to be smaller than 4 |
| [in] | type | type of activation functions |
Supported framework: TensorFlow Lite for Microcontrollers. This activation function must be bit precise congruent with the corresponding TFLM tanh and sigmoid actication functions
F32_t TANH function.
| [out] | aOutData | pointer to output |
| [in] | aInData | pointer to inpu |
| [in] | aCount | number of elements |
Q7 RELU function.
| [in] | aInData | pointer to input/output |
| [in] | upper_bound | maximum value to limit the output vector |
| [in] | aCount | number of elements |
| void tpt_relu_any_q7_buf | ( | q7_t * | aOutData, |
| const q7_t * | aInData, | ||
| const q7_t | upper_bound, | ||
| uint32_t | aCount ) |
Q7 RELU function.
| [out] | aOuData | pointer to output |
| [in] | aInData | pointer to input |
| [in] | upper_bound | maximum value to limit the output vector |
| [in] | aCount | number of elements |
| void tpt_relu_q15 | ( | q15_t * | aInData, |
| uint16_t | aCount ) |
Q15 ReLu function.
Q15 RELU function.
| void tpt_relu_q7 | ( | q7_t * | aInData, |
| uint16_t | aCount ) |
Q7 ReLu function.
Q7 RELU function.
| const f32_t CONST_1_3 = 0.3333333f |
| const f32_t CONST_MAX_TANH = 10.f |
| const f32_t CONST_MIN_TANH = -10.f |
| const f32_t CONST_THR = 5.e-3 |