tflite conversion; Encountered unresolved custom op: TensorArrayV3.Node

Viewed 936

[Edit for relevance]

After compiling this model with this config:

converter = tf.lite.TFLiteConverter.from_frozen_graph(
        path/to/graph.pb,
        input_arrays=["Cast"],
        output_arrays=["features"],
        input_shapes={"Cast":[1, 128, 64, 3]}) 
converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS,
        tf.lite.OpsSet.SELECT_TF_OPS]
converter.allow_custom_ops = True
converter.experimental_new_converter = True
converter.optimizations = [tf.lite.Optimize.DEFAULT]
tflite_model = converter.convert()

a tflite model is produced, but calling allocate_tensors on the interpreter causes this error:

RuntimeError: Regular TensorFlow ops are not supported by this interpreter. 
              Make sure you apply/link the Flex delegate before 
              inference.Node number 0 (FlexTensorArrayV3) failed to prepare.

So it would seem I have build tflite_convert with support for tensorflow ops...

0 Answers
Related