Re: Mismatch opcode version TRANSPOSE

92 views
Skip to first unread message

Advait Jain

unread,
Oct 15, 2021, 2:12:36 PM10/15/21
to Terry (Woncheol) Heo, SIG micro, TensorFlow Lite, ant...@wisear.io

On Fri, Oct 15, 2021 at 11:11 AM Advait Jain <advai...@google.com> wrote:
Can you try the latest TFLM Arduino library from this repository and let us know if you continue to run into this issue?

Cross-linking the issue that you had created on the TFLM repository for completeness: https://github.com/tensorflow/tflite-micro/issues/566

And please feel free to ask TFLM-specific questions via a github issue on the TFLM repository or the SIG-micro mailing list.



On Thu, Oct 7, 2021 at 9:32 PM 'Terry (Woncheol) Heo' via TensorFlow Lite <tfl...@tensorflow.org> wrote:
Please check the example code how to create your own OpResolver.

You should have something like `micro_op_resolver.AddTranspose()`.

Or just simply use AllOpsResolver.

Terry

On Tuesday, October 5, 2021 at 4:08:37 PM UTC+9 ant...@wisear.io wrote:
Hi Terry,

Thanks for your quick answer.

I used the default imports in my Arduino code :

```
...
#include <TensorFlowLite.h>
#include <tensorflow/lite/micro/all_ops_resolver.h>
#include <tensorflow/lite/micro/micro_error_reporter.h>
#include <tensorflow/lite/micro/micro_interpreter.h>
#include <tensorflow/lite/schema/schema_generated.h>
#include <tensorflow/lite/version.h>
...
```
I have found this issue, which is related to my problem. Would you have any recommendation to generate my own .zip Arduino library?

Antoine

On Tuesday, October 5, 2021 at 6:18:54 AM UTC+2 Terry (Woncheol) Heo wrote:
Hi, Antoine

Did you use AllOpsResolver?
If you're using your own MicroMutableOpResolver, you should register op kernels you're using.

Terry

On Tue, Oct 5, 2021 at 3:35 AM Antoine Lebaud <ant...@wisear.io> wrote:

Hi everyone,

I am trying to use a TensorFlow model converted to TFLite Micro on my Arduino BLE, however I got the following error.

```

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

Failed to get registration from op code TRANSPOSE

 Failed starting model allocation.

Invoke() called after initialization failed

Invoke failed!

```

I have checked the arduino tensorflow lite library version, that the latest. 

I have used tensorflow-2.6.0 to train and convert my model.


My conversion code:

```

# Convert the model to the TensorFlow Lite format without quantization
converter = tf.lite.TFLiteConverter.from_keras_model(origin_model)

converter.target_spec.supported_ops = [
tf.lite.OpsSet.TFLITE_BUILTINS, # enable TensorFlow Lite ops.
]

tflite_model = converter.convert()

# Save the model to disk
open(FOLDER_DRIVE_MODEL_DL + 'tflite/' + tflite_model_name + ".tflite", "wb").write(tflite_model)

```

My converted model architecture:

stellar-shadow-117.png

In any case, don’t hesitate to correct me if I am wrong.


Did you receive this email by mistake ? Sorry about that! Please note that this message and the files attached must stay CONFIDENTIAL. If you are not an intended recipient you may not review, copy or distribute this message. If you have received this message in error, please notify us immediately by replying to this email and then delete it from your system.

--
You received this message because you are subscribed to the Google Groups "TensorFlow Lite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tflite+un...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/tflite/42d929ba-6427-404d-988a-454166c346ben%40tensorflow.org.

--
You received this message because you are subscribed to the Google Groups "TensorFlow Lite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tflite+un...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/tflite/098da7ac-e99c-406e-a81a-c8636c638235n%40tensorflow.org.
Reply all
Reply to author
Forward
0 new messages