0

I have a TFLite model converted from Jax:

converter = tf.lite.TFLiteConverter.experimental_from_jax(
    [serving_func], [[("encoder_inputs", encoder_inputs), ("decoder_inputs", decoder_inputs), ("primings", primings)]])
converter.target_spec.supported_ops = [
    tf.lite.OpsSet.TFLITE_BUILTINS, tf.lite.OpsSet.SELECT_TF_OPS
]
converter.optimizations = [tf.lite.Optimize.DEFAULT]
tflite_model = converter.convert()

When I try to load it in Python, I get

ValueError: Didn't find op for builtin opcode 'SELECT' version '3'. An older version of this builtin might be supported. Are you using an old TFLite binary with a newer model?
Registration failed.

When I try to load the model on device in Kotlin, it ends with

java.lang.IllegalArgumentException: Internal error: Cannot create interpreter: Didn't find op for builtin opcode 'SELECT' version '3'. An older version of this builtin might be supported. Are you using an old TFLite binary with a newer model?

What should I try doing differently? If I try to remove anything from target_spec.supported_ops, the converter will not convert.

hlidka
  • 2,086
  • 1
  • 15
  • 14

0 Answers0