Softmax using the float-native API signature.
arm_cmsis_nn_status arm_softmax_f32(const float32_t *input, int32_t num_rows, int32_t row_size, float32_t *output)Softmax using the float-native API signature.
Each row is normalized independently, and input values never affect the return status at any optimization or floating-point mode. In a row that also holds a finite entry, a -Inf entry gets a small probability that is not guaranteed to be exactly 0 (the scalar exponential clamps its argument). A row holding NaN or +Inf, or only -Inf entries, yields unspecified output values for that row; every other row is still computed.
Parameters
| Name | Type | Direction | Description |
|---|---|---|---|
input | const float32_t * | in | Pointer to the input matrix stored as `num_rows` rows of `row_size` values. |
num_rows | int32_t | in | Number of rows in the input matrix. |
row_size | int32_t | in | Number of columns per row. |
output | float32_t * | out | Pointer to the output matrix. |
Returns
| Description |
|---|
| `ARM_CMSIS_NN_SUCCESS` on success or `ARM_CMSIS_NN_ARG_ERROR` on invalid arguments (NULL pointer, `num_rows` < 1 or `row_size` < 1); on error nothing is written. |