LoginSignup
0
2

More than 5 years have passed since last update.

Raspberry Pi 用 TensorFlowLite ビルド

Last updated at Posted at 2018-09-24

概要

Raspberry Pi でTensorFlowLiteを動かしたいので、nightly-devel でビルドしてみました。

準備

まず、docker イメージを起動します。

# docker pull tensorflow/tensorflow:nightly-devel
# docker run -it -w /tensorflow tensorflow/tensorflow:nightly-devel bash

次に、パッケージリストを更新した後、armhf のクロスビルドツールチェインをインストールします。

# apt update
# apt install -y crossbuild-essential-armhf

ビルド

依存ファイルのダウンロードスクリプト実行後、ビルドを実行します。

# git pull
# ./tensorflow/contrib/lite/tools/make/download_dependencies.sh
# ./tensorflow/contrib/lite/tools/make/build_rpi_lib.sh

成果物

成果物は以下のディレクトリに生成されています。

# ls ./tensorflow/contrib/lite/tools/make/gen/rpi_armv7l/lib
benchmark-lib.a  libtensorflow-lite.a

お疲れさまでした。

参考

TensorFlow Lite for Raspberry Pi :
https://www.tensorflow.org/lite/rpi
Docker :
https://www.tensorflow.org/install/docker

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2