LoginSignup
0

More than 5 years have passed since last update.

raspberry pi 1でtensorflow lite その25

Last updated at Posted at 2018-12-24

概要

raspberry pi 1でtensorflow liteやってみた。
tfliteファイルを作ってみた。
kerasモデルから作ってみた。
データセットは、xor.
tfliteファイルを調査してみた。

写真

tensorflow-lite-r15-android-81-neural-network-api-72-638.jpg

kerasモデル

model = Sequential()
model.add(Dense(8, input_dim = 2))
model.add(Activation('tanh'))
model.add(Dense(1))
model.add(Activation('sigmoid'))

結果

Tensorは、理解できるが。nodeは、対応がつかん。

=== Pre-invoke Interpreter State ===
Interpreter has 13 tensors and 4 nodes
Inputs: 8
Outputs: 1

Tensor   0 activation/Tanh          kTfLiteFloat32   kTfLiteArenaRw         32 bytes ( 0.0 MB)  1 8
Tensor   1 activation_1/Sigmoid     kTfLiteFloat32   kTfLiteArenaRw          4 bytes ( 0.0 MB)  1 1
Tensor   2 dense/BiasAdd            kTfLiteFloat32   kTfLiteArenaRw         32 bytes ( 0.0 MB)  1 8
Tensor   3 dense/MatMul_bias        kTfLiteFloat32   kTfLiteMmapRo          32 bytes ( 0.0 MB)  8
Tensor   4 dense/kernel/transpose   kTfLiteFloat32   kTfLiteMmapRo          64 bytes ( 0.0 MB)  8 2
Tensor   5 dense_1/BiasAdd          kTfLiteFloat32   kTfLiteArenaRw          4 bytes ( 0.0 MB)  1 1
Tensor   6 dense_1/MatMul_bias      kTfLiteFloat32   kTfLiteMmapRo           4 bytes ( 0.0 MB)  1
Tensor   7 dense_1/kernel/transpose kTfLiteFloat32   kTfLiteMmapRo          32 bytes ( 0.0 MB)  1 8
Tensor   8 dense_input              kTfLiteFloat32   kTfLiteArenaRw          8 bytes ( 0.0 MB)  1 2
Tensor   9 (null)                   kTfLiteNoType    kTfLiteMemNone          0 bytes ( 0.0 MB)  (null)
Tensor  10 (null)                   kTfLiteNoType    kTfLiteMemNone          0 bytes ( 0.0 MB)  (null)
Tensor  11 (null)                   kTfLiteNoType    kTfLiteMemNone          0 bytes ( 0.0 MB)  (null)
Tensor  12 (null)                   kTfLiteNoType    kTfLiteMemNone          0 bytes ( 0.0 MB)  (null)

Node   0 Operator Builtin Code   9
  Inputs: 8 4 3
  Outputs: 2
Node   1 Operator Builtin Code  28
  Inputs: 2
  Outputs: 0
Node   2 Operator Builtin Code   9
  Inputs: 0 7 6
  Outputs: 5
Node   3 Operator Builtin Code  14
  Inputs: 5
  Outputs: 1



以上。

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