user293895
user293895

Reputation: 1527

Finding dynamic tensors in a tflite model

I am currently experiencing the following error when loading a tflite model using the C API:

ERROR: Attempting to use a delegate that only supports static-sized tensors with a graph that has dynamic-sized tensors.

The tflite model can be found here. It is a tflite conversion of the LEAF model.

The input and output tensors upon inspection seem to have static sizes. I have inspected the model with Netron and cannot find any dynamic tensors, however I may have overlooked. Is there a way to see which tensors specifically are causing an issue with their dynamic tensors?

Upvotes: 3

Views: 3357

Answers (2)

morteza mgh
morteza mgh

Reputation: 33

add this dependency in your gradle file to support ops model:

org.tensorflow:tensorflow-lite-select-tf-ops:2.8.0

Upvotes: 0

Jae sung Chung
Jae sung Chung

Reputation: 903

Even though there are no dynamic size tensors in the graph, the above graph has a control flow op, While op. Currently, graphs with control flow ops are regarded as dynamic graphs and those graphs are not supported through the hardware acceleration delegates, which allow the only static graph structure.

Upvotes: 5

Related Questions