Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use tfLite c_api #65051

Closed
saad-koukous opened this issue Apr 4, 2024 · 1 comment
Closed

how to use tfLite c_api #65051

saad-koukous opened this issue Apr 4, 2024 · 1 comment
Assignees
Labels
comp:lite TF Lite related issues subtype: ubuntu/linux Ubuntu/Linux Build/Installation Issues

Comments

@saad-koukous
Copy link

saad-koukous commented Apr 4, 2024

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 22.04.4 LTS
  • TensorFlow installed from (source or binary):
  • TensorFlow version (or github SHA if from source):

Provide the text output from tflite_convert

cant find information of how to build the lite c_api 

Standalone code to reproduce the issue
Provide a reproducible test case that is the bare minimum necessary to generate
the problem. If possible, please share a link to Colab/Jupyter/any notebook.

Also, please include a link to a GraphDef or the model if possible.

Any other info / logs
I used the tensorflow documentation of how to build the library with c_make but the terminal crush and close automatically in the step 5 whitout any error msg

@saad-koukous saad-koukous added the comp:lite TF Lite related issues label Apr 4, 2024
@LakshmiKalaKadali LakshmiKalaKadali added comp:lite TF Lite related issues subtype: ubuntu/linux Ubuntu/Linux Build/Installation Issues and removed comp:lite TF Lite related issues labels Apr 8, 2024
@saad-koukous
Copy link
Author

I didn't find the problem, but I used Bazel as an alternative.

Clone the TensorFlow Lite repository.
Build the library using this command: bazel build -c opt //tensorflow/lite/c:libtensorflowlite_c.so.
Copy libtensorflowlite_c.so to your folder from bazel-bin/tensorflow/lite/c/.
Compile: gcc -o hello_tf hello_tf.c -I. -Llib/tensorflow/lite -ltensorflowlite_c.
Copy and paste your dynamic library to /usr/lib: sudo cp lib/tensorflow/lite/libtensorflowlite_c.so /usr/lib.
Almost done: ./hello_tf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:lite TF Lite related issues subtype: ubuntu/linux Ubuntu/Linux Build/Installation Issues
Projects
None yet
Development

No branches or pull requests

3 participants