Vengineerの妄想(準備期間)

人生は短いけど、長いです。人生を楽しみましょう!

Google Edge TPUのModel Compilerに制約がなくなった


Google Edge TPU の Model Compilerクラウドベースです。今まで、限定的なモデルしか利用できませんでしたが、


によると、その制約が無くなったようですね。ただし、下記の要件はあります。

 ・Tensor parameters are quantized (8-bit fixed-point numbers). 
  You must use quantization-aware training (post-training quantization is not supported).

 ・Tensor sizes are constant at compile-time (no dynamic sizes).

 ・Model parameters (such as bias tensors) are constant at compile-time.

 ・Tensors are either 1-, 2-, or 3-dimensional. 
    If a tensor has more than 3 dimensions, then only the 3 innermost dimensions may have a size greater than 1.

 ・The model uses only the operations supported by the Edge TPU (see the following link).

TensorFlow models on the Edge TPU が Edge TPU がサポートしている Op です。

この「TensorFlow models on the Edge TPU」では、1つのモデル内で Edge TPU がサポートしていない Op がある場合は、
それ以降の Op は Edge TPU ではなく、CPU にて実行されるようですね。
(その後、Edge TPU がサポートしている Op があったとしても)

  Softmax	Supports only 1D input tensor with a max of 16,000 elements.

とありますので、16000分類まで可能ですね。

この Python コードを使うことで、TensorFlow Liteのモデルを解析して、HTMLファイルにしてくれるようです。

それから、
  We're also releasing a new version of Mendel OS (3.0 Chef) for the Dev Board 
  with a new board management tool called Mendel Development Tool (MDT).

  To help with the developer workflow, our new C++ API works with the TensorFlow Lite C++ API 
  so you can execute inferences on an Edge TPU. 
  In addition, both the Python and C++ APIs now allow you to run multiple models in parallel, 
  using multiple Edge TPU devices.

とあり、複数の Edge TPU を使えるようになったんですね。

Edge TPUは、Debian/Linux のみで下記のデバイスをサポートしているので、
USB 3.0 たくさんついている x86-64 PC を使えば、いいんじゃないかな?

 ・ARM, EABI5    => これは、Raspberry Piシリーズ
 ・ARM, AArch64  => Dev Board を含む、ARM64コア
 ・x86-64

Jetson Nanoも ARM64コアなのでできそう。USB 3.0が4個付いているし。。。どうかな?