Can you comment out "find Threads REQUIRED" when compiling tflite library files?
Hi @panhu,

Please let me know if you followed this[ document] (https://www.tensorflow.org/lite/guide/build_cmake#build_tensorflow_lite_c_library) for build from source.  The error might be due to pthread libraries. Verify once ```pthread``` library is included or not.  Please let us know if the issue still persists.

Yes, TFlite provides C APIs to interact with the C environment.  TFLite  can run in a pure  C environment. 

Thank you
 I performed the operation based on that document and then used the following command for cross compilation:

ARMCC_FLAGS="-march=rv32imafdcpzpsfoperand_xtheade -mabi=ilp32d -mcmodel=medlow -g2 -Os -DSHL_BUILD_REF -DSHL_BUILD_GREF -DSHL_BUILD_E907 -DSHL_BUILD_RTOS"

ARMCC_PREFIX=/home/bin/riscv64-unknown-elf-

cmake  -DCMAKE_C_COMPILER=${ARMCC_PREFIX}gcc  -DCMAKE_C_FLAGS="${ARMCC_FLAGS}" -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_SYSTEM_NAME=Generic -DCMAKE_SYSTEM_PROCESSOR=riscv64 ../lite/c



However, my toolchain does not support the use of pthreads, so can I not use pthreads during compilation. Hi @panhu,
 Make sure to enable flags related to RISCv64 . Please go through the [documentation](https://github.com/riscv-collab/riscv-gnu-toolchain/blob/master/README.md) and other supporting references [1](https://github.com/riscv-software-src/riscv-tools/issues/184), [2](https://github.com/congvm-cs/librealsense_for_arm/issues/2). Maybe you have to use this tool chain ```riscv-gnu-toolchain```. 
Please let us know for further assistance.

Thank You Thanks,May I ask, the default quantization method used by tflite is max_ Min or channel quantization? Hi @panhu,

The default quantization method used by tflite is channel quantization. This means that, depending on its own minimum and maximum values, each weight channel is individually mapped to a smaller range of fixed-point values (usually 8 bits). For most models, this method achieves a balance between accuracy and efficiency.

Thank You





  Thank you for your reply. I would like to ask why my model only has four convolutional layers, each with a relu layer behind it. However, why does using tflite to quantify the model still output negative values during inference. Hi @panhu,

1. The ReLU introduces non-linearity to the network by adding Relu with each Conv layers, which makes it capable of modeling more complex functions than linear models. Coming to the no.of convolutional layers depends on the model, usecase,etc. Without complete information about  your model, the analysis is not possible. 
2. The output of your TFLite model might be negative due to "zero point" or ReLu or loss of precision. Carefully selecting Zero point to weights and activations might solve your issue. 

As the primary issue was addressed, Could you please feel free to close the current issue and create new issue for the other queries so that it will be easily tracked.
 Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62593">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62593">No</a>

**System information**
- Linux
- TensorFlow Lite in Play Services SDK version


**Standalone code to reproduce the issue**
I want to use the C toolchain to compile the C interface of tflite, but the toolchain does not support using the Threads library, so I commented find_ Package (Threads Required), result in an error running abseil-cpp again, xxx links to target "Threads:: Threads" but the target was not found.
Can tflite run in a pure c environment?
