Coder Social home page Coder Social logo

Comments (2)

gaikwadrahul8 avatar gaikwadrahul8 commented on January 20, 2025

Hi, @DanielVacha-dv

Thank you for bringing this issue to our attention, I believe you're following the exact steps mentioned in this codelab tutorial in that it's using the older version of TensorFlow so could you please try with latest version by adding below line, if you want to use GPU then please add this line implementation 'org.tensorflow:tensorflow-lite-gpu:+' or else ignore it

dependencies {
    implementation 'org.tensorflow:tensorflow-lite:+'
    implementation 'org.tensorflow:tensorflow-lite-gpu:+'      // Import the GPU delegate plugin Library for GPU inference
}

We do have TensorFlow Lite Digit Classification Demo Application if you want to give it try

Please let us know after trying with latest version is it resolving your issue or not ? if issue still persists please let us know with error log and steps which you followed before encountering the error message that will help us to investigate your issue further.

Thank you for your cooperation and patience.

from tensorflow.

DanielVacha-dv avatar DanielVacha-dv commented on January 20, 2025

Hello gaikwadrahul8
Thank you for your reply. You're right, I tried to follow the instructions here https://developer.android.com/codelabs/digit-classifier-tflite?hl=en#0
and also in https://colab.research.google.com/github/tensorflow/examples/blob/master/lite/codelabs/digit_classifier/ml/step2_train_ml_model.ipynb#scrollTo=C4ASalaLIbu2 as accurately as I could.
After cloning the project from the Git repository, I immediately ran the variant in the finish directory and added the mnist.tflite file to the desired location. I had problems during the build, so I changed the parameters in the build.gradle file.
The next day after sending the email, I couldn't be satisfied with the failure and that's why I started, at least superficially, into the issue of creating models and asked Gemini as well.
Gemini advised me to edit the part with the model settings
"converter.target_spec.supported_ops = [
tf.lite.OpsSet.TFLITE_BUILTINS, # enable LiteRT ops.
tf.lite.OpsSet.SELECT_TF_OPS # enable TensorFlow ops.
]" but it still didn't work. Finally, out of desperation, I tried not to save the model with tflite_quantized_model , f.write(tflite_quantized_model) but with this tflite_float_model. Only then I was able to run the application without crashing.
Following your advice, I cloned the https://github.com/tensorflow/examples.git repository again today to a new location and tried the recommended steps, but that also resulted in a translation error. I don't know if it's helpful, but I'm attaching the build.gradle file that allowed me to run the application and also the model (mnist.tflite) that contains tflite_float_model.
Thank you for your cooperation
Regards, Daniel
build.gradle.txt
mnist.tflite.txt

from tensorflow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.