Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TF Lite: Encountered unresolved custom op: ´`{.. #43

Open
sfiruch opened this issue Nov 23, 2020 · 3 comments
Open

TF Lite: Encountered unresolved custom op: ´`{.. #43

sfiruch opened this issue Nov 23, 2020 · 3 comments

Comments

@sfiruch
Copy link

sfiruch commented Nov 23, 2020

Tested with Emgu.TF.Lite 2.4.0.1059. Loading segm_full_v491.zip in a .NET 3.1 Core WPF app with new Interpreter(new FlatBufferModel("segm_lite_v509.tflite")).AllocateTensors(); results in the following exception, with varying random characters for the custom op:

Encountered unresolved custom op: ´�`{.�.
   at Emgu.TF.Lite.TfLiteInvoke.TfliteErrorHandler(Int32 status, IntPtr errMsg)
   at Emgu.TF.Lite.TfLiteInvoke.tfeInterpreterAllocateTensors(IntPtr interpreter)
   at Emgu.TF.Lite.Interpreter.AllocateTensors()

(Btw: Thanks for the great work!)

@emgucv
Copy link
Owner

emgucv commented Nov 23, 2020

It is quite likely as the error message indicates: Your tflite model used a custom operation that is not part of the standard tflite distribution.

@emgucv
Copy link
Owner

emgucv commented Nov 23, 2020

Btw, upon checking your model, it seems that the model may be a quantized tflite model. Let me know if that is correct.

If you used a quantized model, please note that tflite on windows do not support quantized model. See this tensorflow ticket:
tensorflow/tensorflow#22532

You will not be able to run quantized model on Windows platform. Please create a non-quantized model instead. You will still be able to use the quantized model on Android, iOS, Mac OS or Linux.

@sfiruch
Copy link
Author

sfiruch commented Nov 24, 2020

Yes, it might be an unsupported operation. The model is from Google Meet. I think it is a quantized model. Wasn't aware that tflite supports fewer operations on Windows than in the browser.

In any case: I think the error message contains uninitialized memory - which seems to be a bug, no?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants