edgetpu: RuntimeError: Encountered unresolved custom op: edgetpu-custom-op.Node number 0 (edgetpu-custom-op) failed to prepare.
My setup:
Using a Coral M.2 Accelerator A+E key in a device running Ubuntu 16.04 The model file is a MobileNet v2 SSD object detection model compiled for edgetpu, and I have successfully run this model file without issue on other similar devices.
Running:
import tflite_runtime.interpreter as tflite
model = tflite.Interpreter(
"/src/object_detection/model/model_edgetpu.tflite",
experimental_delegates=[tflite.load_delegate('libedgetpu.so.1')]
)
model.allocate_tensors()
The model.allocate_tensors() call results in the following RuntimeError:
RuntimeError: Encountered unresolved custom op: edgetpu-custom-op.Node number 0 (edgetpu-custom-op) failed to prepare.
Given that I’ve seen this code + model work on other devices, I’m guessing that the issue here is either a hardware connection or perhaps a corrupt/missing installation. Under what conditions should I expect to see this error? Do you know what’s likely causing it now?
Thanks!
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15
@mrusme oh, that’s most likely because EDGETPU_SHARED_LIB didn’t mapped to the correct platform
Had the same issue for a Python script I’ve been working on, solved it by replacing the
tflite.Interpreter(...call from @BotScutters (up there in the issue description) with a call to this function:Also added the following to the script head:
That solved the issue, at least in my case.
Doesn’t seem to fix the issue, unfortunately. The device has been taken offline, so I won’t be able to investigate this for a bit, but once it’s back up I should have improved access to it and will revisit this issue. Thanks Nam!
Good morning, @Namburger, I just got some data regarding this issue.
The response from the two commands you asked to run:
And here’s an excerpt from the strace log from when it was trying to load libedgetpu.so.1, and I’ve send you the complete log separately. It looks like it’s searching in the wrong directories, and actually in some directories associated with OpenVINO (we’ve run previous experiments with an Intel Neural Compute Stick on this device), so that seems interesting. What determines the path(s) it checks while trying to load libedgetpu?
Thanks again for all of your help on this!