arduino / arduino/ArduinoTensorFlowLiteTutorials
TFLite MicroInterpreter() never returns on Arduino Nano BLE 33 Sense
- 主要言語
- Jupyter Notebook
- スター
- 270
- フォーク
- 122
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I am trying out the gesture recognization example using the **IMU_Classifier** example for detecting a "punch" gesture.
I see that the Arduino setup() code is kind of blocked when trying to initialize a MicroInterpreter() instance as below.
```
// Create a static memory buffer for TFLM, the size may need to
// be adjusted based on the model you are using
constexpr int tensorArenaSize = 8 * 1024;
byte tensorArena[tensorArenaSize];
tfLiteInterpreter = new tflite::MicroInterpreter(tfLiteModel,tfLiteOpsResolver, tensorArena, tensorArenaSize, &tfLiteErrorReporter);
```
Could you please share if this could be due to model size or any other dependency not being met? I gave it a try by shrinking model layers to reduce the model size as below but I still see an issue. Here, I am only trying to classify the punch gesture.
```
`# build the model and train it
model = tf.keras.Sequential()
model.add(tf.keras.layers.Dense(16, activation='relu'))
model.add(tf.keras.layers.Dense(8, activation='relu'))
model.add(tf.keras.layers.Dense(NUM_GESTURES, activation='sigmoid')) # softmax is used, because we only expect one gesture to occur per input
model.compile(optimizer='rmsprop', loss='mse', metrics=['mae'])
history = model.fit(inputs_train, outputs_train, epochs=600, batch_size=1, validation_data=(inputs_validate, outputs_validate))
`
```
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
Arduino Nano BLE 33 Sense 上の IMU_Classifier 例の setup() と、そこで示されている tflite::MicroInterpreter の初期化から調査を始めます。モデル、8 KB の tensor arena、および記載されている依存関係を確認し、初期化がなぜ一度も戻らないのかを特定します。原因が特定され、punch-classification 例がブロックせずに setup を完了できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- arduino, jupyter-notebook, keras, tensorflow
- 領域
- embedded-iot, machine-learning
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100