Skip to content
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

Upgrading TFLite package (from TF 2.8 to Play Services) #65232

Open
tgpsantos opened this issue Apr 8, 2024 · 1 comment
Open

Upgrading TFLite package (from TF 2.8 to Play Services) #65232

tgpsantos opened this issue Apr 8, 2024 · 1 comment
Assignees
Labels
Android comp:lite TF Lite related issues stat:awaiting tensorflower Status - Awaiting response from tensorflower TF 2.8 type:support Support issues

Comments

@tgpsantos
Copy link

System information

  • TensorFlow Lite in Play Services SDK version (found in build.gradle):
        implementation 'com.google.android.gms:play-services-tflite-java:16.1.0'
        implementation 'com.google.android.gms:play-services-tflite-gpu:16.1.0'

Hi guys,

I'm currently upgrading our tensorflow-lite package from 2.8 to the new Play Services bundle. However, I've come across into a significantly different API compared to what we have right now and some of the documentation.

Here are my doubts

  • is version from Play services actually the most up-to-date? last update to tflite-java 16.1.0 seems to be from may 2023
  • what's the reason for [com.google.android](com.google.android.gms:play-services-tflite-java) library and distribution to be different from org.tensorflow:tensorflow-lite ?
  • if play services is the most up to date, there seems to be some inconsistencies in the documentation? For instance, I can't find the Interpreter anymore now. It seems to have been replaced by InterpreterApi, but it's unclear why we still see both in documentation
  • If Interpreter was actually replaced by InterpreterApi, what's the new way to get the getSignatureKeys from this Play Services library?
  • I was using Interpreter before so it seems natural to update everything for InterpreterApi, but is it advised against in any way?
  • Is [CompatList](https://www.tensorflow.org/lite/api_docs/java/org/tensorflow/lite/gpu/CompatibilityList) deprecated / no need to call getBestOptionsForThisDevice anymore?
  • compatList.isDelegateSupportedOnThisDevice replaced by TfLiteGpu.isGpuDelegateAvailable ?

Thanks for the help!

@google-ml-butler google-ml-butler bot added the type:support Support issues label Apr 8, 2024
@tilakrayal tilakrayal added comp:lite TF Lite related issues TF 2.8 labels Apr 10, 2024
@tilakrayal tilakrayal assigned pkgoogle and unassigned tilakrayal Apr 10, 2024
@pkgoogle
Copy link

Hi @tgpsantos, I don't have all the answers but here are some of my thoughts:

If Interpreter was actually replaced by InterpreterApi, what's the new way to get the getSignatureKeys from this Play Services library?

I don't believe there is a new way... is there something you can't do with the new InterpreterApi, that you needed that method previously that you can't do now?

I was using Interpreter before so it seems natural to update everything for InterpreterApi, but is it advised against in any way?

I would update everything and that is expected. Let us know if anything goes wrong.

Hi @arfaian, can you please take a look. Thanks.

@pkgoogle pkgoogle added the stat:awaiting tensorflower Status - Awaiting response from tensorflower label Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android comp:lite TF Lite related issues stat:awaiting tensorflower Status - Awaiting response from tensorflower TF 2.8 type:support Support issues
Projects
None yet
Development

No branches or pull requests

4 participants