This project demonstrates Neural Networks inference in MCUs with constrained resources (memory and CPU frequency).
See Releases. To upload an ELF file, use STM32 CubeProgrammer.
Online handwritten character classification.
Gated Recurrent Unit.
- input shape:
(30, 2)
- 30 points of X and Y from a touch screen; - GRU hidden unit shape:
(100,)
; - output shape:
(26,)
- 26 English letters.
from keras import layers, models
gru = models.Sequential()
gru.add(layers.GRU(units=100, activation='tanh', recurrent_activation='hard_sigmoid',
return_sequences=False, implementation=1,
input_shape=(30, 2)))
gru.add(layers.Dense(units=26, activation='softmax'))
Model training script: gru.py
Pretrained model dir: models
Usage: GRU inference
STM32F429 Discovery board.
- Flash: 2048 Kb
- RAM: 256 Kb
- CPU: 180 MHz