arduino / arduino/ArduinoTensorFlowLiteTutorials

TFLite MicroInterpreter() never returns on Arduino Nano BLE 33 Sense

未关闭
#26 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
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

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。