tflite_runtime 在 raspberry pi 上收到非法指令

tflite_runtime get Illegal instruction on raspberry pi

使用以下命令在 raspberry pi 上安装 tflite_runtime 后

echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | sudo tee /etc/apt/sources.list.d/coral-edgetpu.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get install python3-tflite-runtime

并尝试导入 tflite .. 我收到“非法指令”

Error screenshot

来自上述站点的预构建 tflite_runtime 软件包集尚未涵盖 armv6 架构。

或者,您可以选择一些其他选项。

(1) 安装 TensorFlow pip 包。

TensorFlow Lite 功能是 TensorFlow 包的一部分,预构建的 TensorFlow pip 包支持 armv6。参见 https://www.tensorflow.org/install/pip

(2) 通过 Bazel 或 CMake 构建您自己的 tflite_runtime。

如果只需要安装tflite_runtime,可以自己搭建tflite_runtime。以下文档描述了 Bazel 和 CMake 的区别以及如何通过它们构建 tflite_runtime

https://www.tensorflow.org/lite/guide/build_arm