Function arm_clamp_s8

Function Documentation

arm_cmsis_nn_status arm_clamp_s8(const int8_t *input, const int8_t act_min, const int8_t act_max, int8_t *output, const int32_t output_size)

S8 clamp function.

This function clamps each element in the input tensor to the range. This can be useful for activations such as relu(0, 6), relu(-1,1), etc.

Parameters:
  • input[in] Pointer to input

  • act_min[in] Minimum value to clamp to

  • act_max[in] Maximum value to clamp to

  • output[out] Pointer to output

  • output_size[in] Number of elements in the tensor

Returns:

The function returns ARM_CMSIS_NN_SUCCESS