-
Notifications
You must be signed in to change notification settings - Fork 144
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
[WiP] [Android] Switch to upstream TFlite binaries instead of precompiled ones #42
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Looks like this relates to issue #16. This is a huge help. Thanks @vishnukvmd! Looking forward to when it's ready. |
@@ -43,7 +43,10 @@ class Classifier { | |||
|
|||
void _loadModel() async { | |||
// Creating the interpreter using Interpreter.fromAsset | |||
_interpreter = await Interpreter.fromAsset(_modelFile); | |||
final gpuDelegateV2 = GpuDelegateV2(); | |||
final options = InterpreterOptions()..addDelegate(gpuDelegateV2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo on the double dots?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cascade notation, compiles as expected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: I'll undo the changes in this file once the GPU delegates are working. Keeping this around so it's easy to reproduce the issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL - Thanks! Still learning Dart (I've been doing Android for 12 years) since I think Flutter has a lot of advantages, but also a little behind where I'd like to be :)
@PaulTR The GPU delegate issue is a regression introduced by these changes, and I don't quite understand what's going on. If you could help or loop in someone who might know what's amiss, that would be great! |
Thanks vishnukvmd! I think this change is resolved with #49, so closing this out. I appreciate your work though! |
Inspiration: yy1300326388/tflite_flutter_plugin
Status
The example app runs without any errors.
But once GPU delegates are enabled by modifying
_loadModel()
withinclassifier.dart
,this fails with the following error:
Any help would be much appreciated :)