shaqian / tflite-react-native

React Native library for TensorFlow Lite
https://www.npmjs.com/package/tflite-react-native
MIT License
289 stars 108 forks source link

Error - 'tensorflow/lite/kernels/register.h' file not found #19

Closed ombinar closed 4 years ago

ombinar commented 4 years ago

include "tensorflow/lite/kernels/register.h"

Thanks.

aleator83 commented 4 years ago

Hi, had the same problem.

Using contrib path in node_modules/tflite-react-native/ios/TfliteReactNative.mm works for me.

You can either set ifdef to TRUE with

sed -i '' 's/ifdef\ CONTRIB_PATH/ifdef\ TRUE/g' node_modules/tflite-react-native/ios/TfliteReactNative.mm

or set CONTRIB_PATH for the TfliteReactNative project.

shaqian commented 4 years ago

Hi @ombinar,

@aleator83 is right. For early versions of tensorflow the header path is "tensorflow/contrib/lite/kernels".

You can uncomment //#define CONTRIB_PATH here to use the old path: https://github.com/shaqian/tflite-react-native/blob/master/ios/TfliteReactNative.mm#L1

Thanks, Qian

A5mad commented 4 years ago

In my case removing the "/contrib" from the path solved it for me