TensorFlow-iOS-Example icon indicating copy to clipboard operation
TensorFlow-iOS-Example copied to clipboard

#import <tensorflow/core/public/session.h> error

Open wenchengxucool opened this issue 6 years ago • 3 comments

'tensorflow/core/public/session.h' file not found

wenchengxucool avatar Feb 27 '18 09:02 wenchengxucool

Sounds like you didn't set up the header search paths in the project settings (or did so incorrectly), so Xcode cannot find the TensorFlow header files.

hollance avatar Feb 27 '18 10:02 hollance

actually, I did this as following:

  • You'll need to add the library at tensorflow/contrib/lite/gen/lib/libtensorflow-lite.a to your linking build stage(target->building phases->link binary with libraries), and add tensorflow/contrib/lite/gen/lib to the building settings-> Library Search Paths setting.

  • The building settings-> Header Search paths needs to contain the root folder of tensorflow:

    • tensorflow/contrib/lite/downloads
    • tensorflow/contrib/lite/downloads/flatbuffers/include

I don't know if there is any difference between your settings and mine~

thank!!

wenchengxucool avatar Feb 27 '18 10:02 wenchengxucool

My article was written before TF-Lite existed, so it's possible the instructions are not 100% correct for this new version of TensorFlow.

hollance avatar Feb 27 '18 12:02 hollance