[Python] Tensorflow Lite (LiteRn) Deployment in Android using Kotlin, Error 'FULLY_CONNECTED'...

Discussão em 'Python' iniciado por Stack, Maio 25, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to integrate deep learning model to my android application. But I am getting stucked on running the model in my application.

    I have created a model that uses tensorflow for detecting the object. For model building I have used the following versions : python => 3.11.11 tensorflow => 2.17.0

    Similarly, in Android side, I have used the following compatible libraries tensorflow Lite => 2.17.0 tensorflow Lite Gpu => 2.17.0 tensorflow Lite Task Vision => 0.4.4

    Also I have used following to convert the tensorflow to liteRn model

    converter = tf.lite.TFLiteConverter.from_keras_model(model)
    converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS]
    converter.optimizations = [tf.lite.Optimize.DEFAULT]
    tflite_model = converter.convert()


    But still I am getting the following error

    Didn't find op for builtin opcode 'FULLY_CONNECTED' version '12'. An older version of this builtin might be supported. Are you using an old TFLite binary with a newer model?

    Error getting native address of native library: task_vision_jni
    java.lang.IllegalArgumentException: Error occurred when initializing ImageClassifier: Didn't find op for builtin opcode 'FULLY_CONNECTED' version '12'. An older version of this builtin might be supported. Are you using an old TFLite binary with a newer model?




    I found some solution in
    Internal error: Cannot create interpreter: Didn't find op for builtin opcode 'FULLY_CONNECTED' version '9' with firebase ml kit and tensorflow-lite

    but it didn't help me specially for Verison 12

    Can any please help me to identify the error and solve this problem ? Thank you for your time and support.

    Continue reading...

Compartilhe esta Página