Comments (9)
I would appreciate any working solution to this, as long i can run my model on Select Ops based on a TensorFlowLiteSelectTFOps library selectively built based on the tflite model itself. Thanks a lot in advance! :)
from tensorflow.
Hi @tanpengshi, it looks like the system is unable to properly link the google protobuf library ... can you ensure you are following all the directions here correctly: https://www.tensorflow.org/lite/guide/build_ios#using_local_swift_or_objective-c_apis
particularly I see that your path does not point to the TF root directory
pod 'TensorFlowLiteSwift', :path => '../../local-podspecs/TensorFlowLiteSwift.podspec'
Where as the source says:
pod 'TensorFlowLiteSwift', :path => '<your_tensorflow_root_dir>'
Let me know if that works. Thanks.
from tensorflow.
I have tried the above and I am still getting the same error. In addition I did :
pod 'TensorFlowLiteSwift'
pod 'TensorFlowLiteSelectTfOps', '~> 0.0.1-nightly'
Then replace i replaced the TensorFlowLiteSelectTfOps.framework with my selectively build TensorFlowLiteSelectTfOps.framework, and I still get the same error when building! I suspect the error comes inherently from the selectively built framework. Are you able to replicate the error I get?
Thank you!
from tensorflow.
Hi @tanpengshi, are you willing to share your model(s) that are used to make your selective build? I'm wondering if any particular ops are causing the issue. Perhaps you can just make a dummy model which includes at least one of all the ops you are using and share that.
from tensorflow.
Hi @pkgoogle, here is the dummy model that contains all the ops!
from tensorflow.
Hi @tanpengshi, I attempted to reproduce it with your model... I'm actually failing on the build the select framework step -- considering you were able to build the Select framework, can you share the steps that you use to build it?
I did this:
git switch r2.14 # to match your TF version
./configure
<Said yes to configure for iOS>
<copied your model file over>
bash tensorflow/lite/ios/build_frameworks.sh --input_models=tflite_CNN_LSTM_dummy.tflite --target_archs=x86_64,armv7,arm64
my output:
INFO: Analyzed target //tensorflow/lite/ios/tmp:TensorFlowLiteSelectTfOps_framework (473 packages loaded, 39899 targets configured).
INFO: Found 1 target...
ERROR: /Users/xxxxxxxxx/git/tensorflow/tensorflow/BUILD:1153:21: declared output 'tensorflow/libtensorflow_framework.2.dylib' was not created by genrule. This is probably because the genrule actually didn't create this output, or because the output was a directory and the genrule was run remotely (note that only the contents of declared file outputs are copied from genrules run remotely)
ERROR: /Users/xxxxxxxxx/git/tensorflow/tensorflow/BUILD:1153:21: Executing genrule //tensorflow:libtensorflow_framework.2.dylib_sym [for tool] failed: not all outputs were created or valid
realpath: illegal option -- -
usage: realpath [-q] [path ...]
Target //tensorflow/lite/ios/tmp:TensorFlowLiteSelectTfOps_framework failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 2868.450s, Critical Path: 470.36s
INFO: 7940 processes: 1075 internal, 6865 local.
FAILED: Build did NOT complete successfully
from tensorflow.
Hi @pkgoogle I made a mistake, the tensorflow version should be r2.16 instead of r.2.14. When I used r2.16, I can successfully build the model, while r2.14 produced similar error.
from tensorflow.
Hmm I'm now currently running into a different issue... which python version are you using? I'm using an M1 and Xcode = 15.0.1. Any other potential environmental difference you can possibly think of?
ERROR: /Users/xxxxxxxx/git/tensorflow/tensorflow/python/BUILD:650:24: Linking tensorflow/python/_pywrap_tensorflow_internal.so [for tool] failed: (Exit 1): cc_wrapper.sh failed: error executing command (from target //tensorflow/python:_pywrap_tensorflow_internal.so) external/local_config_cc/cc_wrapper.sh @bazel-out/darwin_arm64-opt-exec-50AE0418-ST-c5da4e9d584e/bin/tensorflow/python/_pywrap_tensorflow_internal.so-2.params
ld: building exports trie: duplicate symbol '__ZN40TableStruct_tsl_2fprotobuf_2fdnn_2eproto7offsetsE'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error in child process '/usr/bin/xcrun'. 1
Target //tensorflow/lite/ios/tmp:TensorFlowLiteSelectTfOps_framework failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 4574.330s, Critical Path: 373.41s
INFO: 14670 processes: 407 internal, 14263 local.
from tensorflow.
My apologies again, if you use TensorFlow r2.16, you will run into the issue later on in Xcode:
The TensorFlow version should instead be r2.9, with the .frameworks bazel installed with Python 3.9 installed with Anaconda with M3 and Xcode 15.3
from tensorflow.
Related Issues (20)
- tflite model maker not install HOT 1
- AttributeError: 'ModelCheckpoint' object has no attribute '_implements_train_batch_hooks' in MoViNet Streaming Model Training HOT 1
- Crash in `tf.raw_ops.SparseCountSparseOutput ` HOT 1
- 16KB so support HOT 1
- Segmentation fault (core dumped) in tf.raw_ops.FractionalMaxPoolGrad when col_pooling_sequence is a very small negative number
- Aborted (core dumped) in `tf.raw_ops.SparseReduceSum\tf.raw_ops.SparseReduceMax` HOT 1
- Aborted (core dumped) in `tf.experimental.numpy.diag/tf.compat.v1.linalg.diag/tf.experimental.numpy.diagflat/tf.keras.ops.diag` HOT 1
- Transfer learning and fine-tuning doc seems to have unexpected results
- YOLOv5n model does work on python tflite but not C++ tflite HOT 1
- Selectively Build TensorFlow Lite with Docker ends with an error.
- SparseTensor Batching Utility
- tf.data.Dataset.save and load custom dataset throw "DataLossError: Unable to parse tensor from stored proto" HOT 1
- tensorflow is so buggy, you guys should just gave up and should migrate to TORCH this is so bad , i cant anymore. HOT 4
- tf.signal.rfftnd throws NotFoundError on CPU execution (GPU-behavior unknown) HOT 1
- The constant folding pass of the TFLite converter prevent storing packed tensors, stores dequantized tensors instead
- why tf use clang as the default compiler on windows? HOT 2
- "invalid static_cast" on AVX512FP16 (e.g. Sapphire Rapids) HOT 1
- Fixed error in code on official TF guide for Transfer Learning and Fine Tuning HOT 1
- TFlite usage on android
- Cannot cross-compile minimal tflite example
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tensorflow.