google-coral / tflite

Examples using TensorFlow Lite API to run inference on Coral devices
https://coral.withgoogle.com
Apache License 2.0
181 stars 67 forks source link

RuntimeError: Internal: Unsupported data type: 0Node number 1 (EdgeTpuDelegateForCustomOp) failed to prepare. #21

Closed james-bjss closed 4 years ago

james-bjss commented 4 years ago

Hi, When testing out my USB Coral device on Windows10 executing the classification example results in the following error:

c:\Users\James\tampopo\tf\coral\tflite\python\examples\classification>python classify_image.py --model models/mobilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite --labels models/inat_bird_labels.txt --input images/parrot.jpg Traceback (most recent call last): File "classify_image.py", line 122, in <module> main() File "classify_image.py", line 100, in main interpreter.allocate_tensors() File "C:\Users\James\AppData\Local\Programs\Python\Python37\lib\site-packages\tflite_runtime\interpreter.py", line 243, in allocate_tensors return self._interpreter.AllocateTensors() File "C:\Users\James\AppData\Local\Programs\Python\Python37\lib\site-packages\tflite_runtime\tensorflow_wrap_interpreter_wrapper.py", line 110, in AllocateTensors return _tensorflow_wrap_interpreter_wrapper.InterpreterWrapper_AllocateTensors(self) RuntimeError: Internal: Unsupported data type in custom op handler: 0Node number 1 (EdgeTpuDelegateForCustomOp) failed to prepare.

Further details: Python Version: Python 3.7.8rc1 tflite Runtime: tflite_runtime-2.1.0.post1-cp37-cp37m-win_amd64.whl edgetpu wheel: edgetpu-2.14.0-cp37-cp37m-win_amd64.whl Driver Package: 2.14.1 (Jun 2020) edgetpu_runtime_20200624.zip

Relates to: #9

james-bjss commented 4 years ago

It seems like reverting to older drivers 2.13.0 (Jan 2020) resolved this issue. However I was simply following the setup guide https://coral.ai/docs/accelerator/get-started/ which links to the latest 2.14.1 drivers and suggests running this example, so others may fall foul of this.

Namburger commented 4 years ago

Hey, 2.14.1 should have been the same as 2.14 with added window supports. This issue is not expected, but please allow me to check with my team. I guess the added supports for pcie must have caused this, another user have experienced the same: https://github.com/google-coral/tflite/issues/16#issuecomment-651078588

Could you try upgrading to 2.14 (without the .1)?

james-bjss commented 4 years ago

Hey, 2.14.1 should have been the same as 2.14 with added window supports. This issue is not expected, but please allow me to check with my team. I guess the added supports for pcie must have caused this, another user have experienced the same: #16 (comment)

Could you try upgrading to 2.14 (without the .1)?

Sure, will try this evening and report back.

james-bjss commented 4 years ago

@Namburger - I can confirm that 2.14.0 is also working. So is just 2.14.1 that is affected.

Namburger commented 4 years ago

@james-bjss perfect, thanks for confirmation, I'll report this with our team

Namburger commented 4 years ago

@james-bjss as it turned out, we uploaded the wrong zipfile for that link :) We just updated it, everything should works now if you redownload the zip file for 1.14.1!

james-bjss commented 4 years ago

@Namburger - Oops! Just tested with the new Zip and it's working fine. Think this one can be closed now. Thanks for your help.

Namburger commented 4 years ago

Perfect! Thanks for confirmation :)