Open Pingou opened 2 months ago
I'm having the same issue.
I'm having the same issue. fatal error: 'tensorflow/lite/c/c_api.h' file not found
Same issue here. Any one have solution?
Same here. Temporary fix is to manually clone tensorflow repo into node_modules/react-native-fast-tflite/
.
This is removed every time you run yarn install
, but you can build the app for now.
Same here. Temporary fix is to manually clone tensorflow repo into
node_modules/react-native-fast-tflite/
. This is removed every time you runyarn install
, but you can build the app for now.
Can you elaborate on your solution? Exactly which module of tensorflow is copied in?
Can you elaborate on your solution? Exactly which module of tensorflow is copied in?
Exactly the one i linked.
Can you elaborate on your solution? Exactly which module of tensorflow is copied in?
Exactly the one i linked.
By clone tensor flow repo, did you mean the entire repo of tensorflow?
By clone tensor flow repo, did you mean the entire repo of tensorflow?
yes, the entire repo.
EDIT: I cloned the entire repo but it's not necessary, see below.
Can you elaborate on your solution? Exactly which module of tensorflow is copied in?
Exactly the one i linked.
By clone tensor flow repo, did you mean the entire repo of tensorflow?
No, It is not neccessary! The only thing you must do is to copy tensorflow/lite
dir to react-native-fast-tflite/cpp
.
In my project, It work fine! But, I meet other issue again. It can't read my tflite model now!
@CannoChen was the next issue related also to this issue ? Thanks
Same here. Temporary fix is to manually clone tensorflow repo into
node_modules/react-native-fast-tflite/
. This is removed every time you runyarn install
, but you can build the app for now.
have you tried pointing to master instead of the npm version? Ex of package.json: "react-native-fast-tflite": "git://github.com/mrousavy/react-native-fast-tflite#master",
Are you seeing this on Android & iOS?
I am seeing only in Android
This is what I did to solve it:
1- Added the package normally through yarn add react-native-fast-tflite
2- Kept a copy of tensorflow
in the app folder
3- Added a post install script on package.json
to copy the tensorflow
folder to node_modules
: "postinstall": "cp -r ./tensorflow ./node_modules/react-native-fast-tflite"
Now, every time I run yarn install
or add another package, the tensorflow
folder is re-copied.
This worked for me. Hope it helps
Same problem here. I hope a solution can be delivered this week . I need TFLite for my project. Thanks
Same problem here. I hope a solution can be delivered this week . I need TFLite for my project. Thanks
Just take the 1.3.0 version while waiting for the issue to be fixed.
Same problem here. I hope a solution can be delivered this week . I need TFLite for my project. Thanks
You can try using tensorflowjs directly. For me, I gave up using this repo. after I used tensorflowjs, my project worked correctly. You can find the code in my project: https://github.com/CannoChen/SmartBMS
@CannoChen was the next issue related also to this issue ? Thanks
No, it isn't. In my view, I dont suggest you to use this repo. I suggest that you should use tensorflowjs directly!!! It more simple, and more close to tensorflow_lite model.
@CannoChen was the next issue related also to this issue ? Thanks
No, it isn't. In my view, I dont suggest you to use this repo. I suggest that you should use tensorflowjs directly!!! It more simple, and more close to tensorflow_lite model.
I’d like to try using TFJS directly. But are the docs from tensorflow correct to install in React native?
@CannoChen was the next issue related also to this issue ? Thanks
No, it isn't. In my view, I dont suggest you to use this repo. I suggest that you should use tensorflowjs directly!!! It more simple, and more close to tensorflow_lite model.
I’d like to try using TFJS directly. But are the docs from tensorflow correct to install in React native?
Of course, you can! But there are some tricks that you may focus:
You must use Tensorflow with version 2.8.
Please use python with version 2.10
If you want to have a demo, please read my code in https://github.com/CannoChen/SmartBMS/tree/main/src/service/slice/TFLiteSlice.ts
I think this issue is related to the file change to android/CMakeLists.txt
https://github.com/mrousavy/react-native-fast-tflite/commit/35d7cbdcb25fee51584f0c5667c9764d4f2ffcfe
any update on this? I need the fix in 1.5.0 to load file on android...but tensorflow/lite/c/c_api.h
missing is still throwing an error.
For those interested, please test https://github.com/mrousavy/react-native-fast-tflite/pull/112 PR posted from @bang9
on 1.4.0, I have the following error on mac m2 when compiling:
In file included from /Users/pingou/react/app/node_modules/react-native-fast-tflite/cpp/TensorHelpers.cpp:9: /Users/pingou/react/app/node_modules/react-native-fast-tflite/android/../cpp/TensorHelpers.h:15:10: fatal error: 'tensorflow/lite/c/c_api.h' file not found
include <tensorflow/lite/c/c_api.h>