We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi all,
I found that the calculation results of the sigmoid activation in tensorflow lite are different from the results of the function "arm_nn_activations_direct_q7" with the sigmoid flag under the same input values. I try to adjust the "int_width" argument of "arm_nn_activations_direct_q7" function from 0 to 3 but the results are still unmatched. Now, I am pretty confused. Are there additional code required such as requantizing the arm_nn_activations_direct_q7's results? I am super confused.
dddyyylll Thanks for the question. The function that you are referring to is not bit exact to TensorFlow Lite Micro(TFLM) and we do not have a TFLM compatible version for sigmoid. You can see the differences between the legacy and TFLM compatible functions in https://github.com/ARM-software/CMSIS_5/tree/develop/CMSIS/NN#legacy-vs-tfl-micro-compliant-apis.
I've created a ticket in CMSIS-NN to explicitly mark the functions that are not compatible with TFLM so it is clear. https://github.com/ARM-software/CMSIS_5/issues/1439
Hope that helps.
I found the document in the CMSIS-NN which mentions the sigmoid activation is not compatible with tensorflow lite a few days ago. But still, thanks for your reply