Comments (5)
I got GPU delegate to work by removing unnecessary import from my project (I don't remember exactly how, but I had made really silly mistake. I guess I had gradle tensorflow gpu import inside my project, not in plugin). But I couldn't run inference on tiny yolov2 because it has operations that are unsupported by tensorflow lite gpu delegate (if I recall correctly it was MAX operation).
How did you enable/add GPU delegate in your Flutter project?
from flutter_tflite.
GPU delegate is now supported in the latest version 1.1.0. Set useGpuDelegate
to true
in loadModel
.
Thanks,
Qian
from flutter_tflite.
Hi, @shaqian
It's a great work! I also tried to apply GPU delegate by adding gpudelegate to .\flutter.pub-cache\hosted\pub.flutter-io.cn\tflite-1.0.4, and also implemented tensorflow-lite-gpu:0.0.0-nightly in dependencies.
However it doesn't seems a huge difference occurs, looking forward to your suggestions!
from flutter_tflite.
Sorry for the delay. I don't have a compatible phone to test GPU. 😂
Looking at the the error, I think the problem may be the path is wrong? Should it be "/org" rather "Lorg" ?
Failed resolution of: Lorg/tensorflow/lite/experimental/GpuDelegate;
@Cheren15 Are you able to get GPU work successfully? I saw discussions previously (if I remember correctly) the GPU version improves certain operations, if your model doesn't use those operations there won't be much difference.
from flutter_tflite.
I got GPU delegate to work by removing unnecessary import from my project (I don't remember exactly how, but I had made really silly mistake. I guess I had gradle tensorflow gpu import inside my project, not in plugin). But I couldn't run inference on tiny yolov2 because it has operations that are unsupported by tensorflow lite gpu delegate (if I recall correctly it was MAX operation).
from flutter_tflite.
Related Issues (20)
- app crashed while deploying tflite loaded model and Android V2 Embedding error HOT 1
- Do not support version greater than 3
- Can I build desktop app by this package?
- E/AndroidRuntime( 4563): Caused by: java.lang.IllegalArgumentException: Cannot copy from a TensorFlowLite tensor (StatefulPartitionedCall:0) with shape [1, 10647, 6] to a Java object with shape [1, 13, 13, 30]. HOT 1
- runModelOnImage returns null HOT 1
- I have a issue in runSegmentationOnImage
- The plugin `tflite` uses a deprecated version of the Android embedding. HOT 1
- The plugin `tflite` uses a deprecated version of the Android embedding. HOT 1
- got this error when running flutter project HOT 3
- Unhandled Exception: PlatformException(Failed to run model, Interpreter busy, java.lang.RuntimeException: Interpreter busy HOT 3
- Can anyone help giving this code in Flutter HOT 2
- help me please
- Failed to transform guice-5.1.0.jar (com.google.inject:guice:5.1.0) to match attributes HOT 1
- Please Update this package HOT 1
- crash when useGpuDelegate is true in v2 HOT 1
- E/AndroidRuntime(10989): Caused by: java.lang.IllegalArgumentException: Cannot copy to a TensorFlowLite tensor (serving_default_conv2d_3_input:0) with 90000 bytes from a Java Buffer with 67500 bytes.
- URGENT!!!!! Please HELP!!! Unhandled Exception: PlatformException(Failed to run model, Attempt to invoke virtual method 'org.tensorflow.lite.Tensor org.tensorflow.lite.Interpreter.getInputTensor(int)' on a null object reference, java.lang.NullPointerException: Attempt to invoke virtual method 'org.tensorflow.lite.Tensor org.tensorflow.lite.Interpreter.getInputTensor(int)' on a null object reference
- URGENT!!!!! Please HELP!!! Unhandled Exception: PlatformException(Failed to run model, Attempt to invoke virtual method 'org.tensorflow.lite.Tensor org.tensorflow.lite.Interpreter.getInputTensor(int)' on a null object reference, java.lang.NullPointerException: Attempt to invoke virtual method 'org.tensorflow.lite.Tensor org.tensorflow.lite.Interpreter.getInputTensor(int)' on a null object reference
- Missing Plugin Exeption
- MissingPluginException(No implementation found for method loadModel on channel tflite)
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 flutter_tflite.