Comments (22)
TFLite is a library more suitable for mobile devices. Maybe you try it for android?
I use TF on macos/win, and TFLite on ios/android.
from hello_tf_c_api.
Does TFLite use the same API as TF C?
I'm working on a project with a headset that runs Android OS. The SDK of that headset allows me to link to .so libraries. That's why I like to know if there is a similar libtensorflow.so for Android.
If it is convenient for you, could you kindly add TFLite usage to your repo?
It'll help me a lot, and I think other people would also be interested in how to use TFLite in Android.
from hello_tf_c_api.
You need use tf in c++? Or in java?
from hello_tf_c_api.
In C/C++
from hello_tf_c_api.
I try add my example.
For now you can try this http://www.sanj.ai/Android-App-With-Tflite-C++-API/
from hello_tf_c_api.
Thanks very much. Could you let me know after you add your examples?
Your tutorials are very concise and clear.
from hello_tf_c_api.
Yes, I update this issues when adding android example
from hello_tf_c_api.
Yes, I update this issues when adding android example
Hi. I'm wondering the progress of updating Tensorflow Lite. No rush though.
BTW, your documents (doc/optimizing.md and doc/prepare_models.md) on mobile devices are detailed and very helpful. I appreciate that.
from hello_tf_c_api.
Yes, I update this issues when adding android example
Hi. I can run TF Lite C++ in Android now, but your tutorials are still welcome.
BTW, are you able to run batch inputs in TF Lite?
For example, a model takes an input-length of 10. I can use Tensorflow C to feed 50 numbers, which runs 5 times of the model with a single function call (which is much faster than manually running the model 5 times).
I see TFLite Interpreter has a function called ResizeInputTensor, which I think is for this purpose. But I got errors when I try to input more numbers. Is there anything that might easily go wrong for beginners?
from hello_tf_c_api.
Hi, check this batch example https://github.com/Neargye/hello_tf_c_api/blob/master/src/batch_interface.cpp
from hello_tf_c_api.
Hi, check this batch example https://github.com/Neargye/hello_tf_c_api/blob/master/src/batch_interface.cpp
It works, but it is for Tensorflow C. Do you have examples for TF Lite?
Thanks.
from hello_tf_c_api.
Try something like https://stackoverflow.com/questions/51576944/tensorflow-lite-for-variable-sized-input
from hello_tf_c_api.
Try something like https://stackoverflow.com/questions/51576944/tensorflow-lite-for-variable-sized-input
I tried that before. However, my program crashes whenever I call
ResizeInputTensor();
AllocateTensors();
even I use the exact dimensions without using batches.
For example, my model takes input of dimensions 1, 100, 9
I tried to run
this->interpreter->ResizeInputTensor(this->interpreter->inputs()[0], {1, 100, 9});
this->interpreter->AllocateTensors();
it crashes. However, if I just call
this->interpreter->AllocateTensors();
then everything works fine. Not sure what goes wrong.
from hello_tf_c_api.
I changed Tensorflow Lite version to 2.0, which allows me to run
this->interpreter->ResizeInputTensor(this->interpreter->inputs()[0], {1, 100, 9});
this->interpreter->AllocateTensors();
Basically, nothing is changed because I just call ResizeInputTensor with original/default dimensinos.
However, I cannot change to other dimensions. This is still an open issue here
tensorflow/tensorflow#22377
It seems that Android Tensorflow Lite does not support it.
from hello_tf_c_api.
could you please send project example, I will try myself
from hello_tf_c_api.
could you please send project example, I will try myself
I attach my sample project below. Thanks.
sample project
from hello_tf_c_api.
Hi, I do some test, it seems you are right, Android Tensorflow Lite does not support it.
from hello_tf_c_api.
Hi, I do some test, it seems you are right, Android Tensorflow Lite does not support it.
Thanks. BTW, do you know if it works in iOS? I'm just curious about that.
from hello_tf_c_api.
Hm, I can check tomorrow in iOS.
from hello_tf_c_api.
Hm, I can check tomorrow in iOS.
Thank you. Please let me know after you check it.
from hello_tf_c_api.
I could not do it on iOS.
from hello_tf_c_api.
I could not do it on iOS.
Thanks.
from hello_tf_c_api.
Related Issues (20)
- Memory leak during inference with frozen graph HOT 9
- session_run hangs on GPU (libtensorflow-gpu) HOT 4
- question about this library HOT 3
- how to turn off verbose and idle threads?
- GPU dll HOT 5
- cuda_driver.cc:175] Check failed HOT 1
- How to create Tensor of TF_BOOL? HOT 2
- TF_INVALID_ARGUMENT
- Inference is running very slow on CPU HOT 1
- Multiple models inference HOT 4
- 3D input to model returns different output than python HOT 1
- What is this actually doing? HOT 2
- TF_SessionRun with multiple outputs gives Segmentation Fault HOT 5
- TF_INVALID_ARGUMENT HOT 1
- Multiple GPU Inferencing HOT 1
- cmake -G "Unix Makefiles" .. stop HOT 1
- Confine TensorFlow C API not to generate more than one threads
- Import LSTM-Layer: Expected input[1] to be control input
- when i load graph the TF_Code is ‘TF_UNKNOWN’ , why?
- when i load graph the TF_Code is ‘TF_INVALID_ARGUMENT ’ , why?
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 hello_tf_c_api.