-
Notifications
You must be signed in to change notification settings - Fork 351
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 your own custom built TensorFlowLiteC.framework on iOS? #64
Comments
Basically for now will have to clone this repo and include it using "path import" in your projects pubspec.yaml. Then in your local version of tflite_flutter_plugin you can replace the ios/TensorFlowLiteC.framework with yours |
Got it... I gave that a try but now I'm getting linker errors after dropping in my Build output
I'm using a dependency override so that the build system thinks I'm still using dependency_overrides:
tflite_flutter:
path: "external/tflite_flutter_plugin/" That's working fine. But as soon as I drop in my own My full steps for the build are:
I can successfully build the framework at tensorflow Any suggestions on how to get this built against Thanks! |
Quick update... I bisected the tensorflow repo to determine where this build failure was introduced and I landed on this commit: I don't understand how that commit could have broken things so I'm still investigating... But I've done several manual builds at that commit and at the parent of that commit and have verified that the bazel version bump does indeed seem to be the breaker. @am15h Can you confirm if you are able to build against the current TF master successfully? |
@mgalgs I do not have access to a Mac, as of now. I can only confirm that TF 2.3.1 should work without any issues for iOS. Opening an issue on tensorflow repository might help? They might be able to provide a resolution to this. |
Looks like it was indeed an issue with Tensorflow itself, which has now been fixed. |
I'm building my own tflite libraries because I need a more recent version than what is currently released. For Android I'm using a Docker-based build environment from the tf repo and build commands from this repo and that's working great 🎉
For iOS I have the libraries built but can't seem to use them in my project. I'm following these instructions, briefly:
This gives me a TensorFlowLiteC_framework.zip, which I don't exactly know what to do with. I've tried replacing
ios/Pods/TensorFlowLiteC/Frameworks/TensorFlowLiteC.framework
in my app with my freshly built one, but that didn't seem to be getting picked up and gets wiped when I do aflutter clean
...So I tried replacing the one in pub-cache:
but then when I build my app with
flutter build ios
I get linker errors:Build output
What's the proper way to integrate my custom built
TensorFlowLiteC.framework
into my app?Thanks!
The text was updated successfully, but these errors were encountered: