【问题标题】:How to run tflite model on Coral CPU如何在 Coral CPU 上运行 tflite 模型
【发布时间】:2019-06-27 14:20:53
【问题描述】:

真的可以在 Coral CPU 上运行 tflite 模型吗?

BasicEngine 的珊瑚文档状态:model must be compiled for the Edge TPU; otherwise, it simply executes on the host CPU. Coral doc

我尝试运行 Keras Mobilenet 转换为 tflite 并故意不为 Edge-tpu 编译但得到以下错误

Traceback (most recent call last):
  File "estimate.py", line 69, in <module>
    main()
  File "estimate.py", line 42, in main
    engine = BasicEngine(args.model)
  File "/usr/lib/python3/dist-packages/edgetpu/swig/edgetpu_cpp_wrapper.py", line 300, in __init__
    this = _edgetpu_cpp_wrapper.new_BasicEngine(*args)
RuntimeError: Error in interpreter initialization.

【问题讨论】:

  • 你解决了吗?我也有同样的问题
  • @RodrigoLaguna,不,还没有解决这个问题。

标签: google-coral


【解决方案1】:

简单的答案是可以。基本上,在您的模型中运行的任何不受支持的操作都会自动在 CPU 上运行。详情请参阅this image

【讨论】:

    【解决方案2】:

    检查转换后的模型输入和输出是否量化为 UINT8。 否则即使在您编译模型之后也会发生。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-11-14
      • 2019-02-26
      • 2021-12-16
      相关资源
      最近更新 更多