34 const float alpha,
const bool is_relu_6)
37 if (is_relu_6 ==
false && alpha == 0)
39 memcpy(output_data, input_data, flat_size);
40 arm_relu_q7(output_data, flat_size);
43 else if (is_relu_6 && alpha == 0)
45 memcpy(output_data, input_data, flat_size);
46 arm_relu6_s8(output_data, flat_size);
51 for (
int i = 0; i < flat_size; i++)
53 const int8_t val = input_data[i];
54 int8_t result = val > 0 ? val : val * alpha;
55 output_data[i] = result;