xiuos/APP_Framework/Applications/knowing_app/mnist
chunyexixiaoyu bf17ef10cb APP_Framework/Applications/: make mnist application running on the stm32f407 board,model data is saved in the flash,note the following points
1. the thread which run the mnist needs 10kb
2. Lwip and useless driver must be not loaded.
3. The entire bin file is close to 1024KB.
2022-01-19 14:53:47 +08:00
..
tools APP_Framework/Framework/:update knowing framework 2021-07-20 14:50:50 +08:00
.gitignore APP_Framework/Framework/:update knowing framework 2021-07-20 14:50:50 +08:00
K210 mnist .png APP_Framework/Framework/:update knowing framework 2021-07-20 14:50:50 +08:00
Kconfig APP_Framework/Framework/:update knowing framework 2021-07-20 14:50:50 +08:00
Makefile solve the compile problem of tflite in xiuos 2021-09-09 18:00:27 +08:00
README.md APP_Framework/Framework/:update knowing framework 2021-07-20 14:50:50 +08:00
SConscript APP_Framework/Framework/:update knowing framework 2021-07-20 14:50:50 +08:00
digit.h APP_Framework/Framework/:update knowing framework 2021-07-20 14:50:50 +08:00
main.cpp solve the compile problem of tflite in xiuos 2021-09-09 18:00:27 +08:00
mnistmain.c solve the compile problem of tflite in xiuos 2021-09-09 18:00:27 +08:00
model.h APP_Framework/Applications/: make mnist application running on the stm32f407 board,model data is saved in the flash,note the following points 2022-01-19 14:53:47 +08:00

README.md

MNIST 说明

要使用本例程MCU RAM必须至少500K左右所以本例程目前在K210上面验证过stm32f407 目前在rtt上原则上只能采取dlmodule加载的方式。

![K210 mnist ](E:\XIUOS_FRAMEWORK\xiuos\APP_Framework\Applications\knowing_app\mnist\K210 mnist .png)

使用

tools/mnist-train.py 训练生成 mnist 模型。

tools/mnist-inference.py 使用 mnist 模型进行推理。

tools/mnist-c-model.py 将 mnist 模型转换成 C 的数组保存在 model.h 中。

tools/mnist-c-digit.py 将 mnist 数据集中的某个数字转成数组保存在 digit.h 中。

参考资料

https://tensorflow.google.cn/lite/performance/post_training_quantization

https://tensorflow.google.cn/lite/performance/post_training_integer_quant

https://colab.research.google.com/github/tensorflow/tensorflow/blob/master/tensorflow/lite/micro/examples/hello_world/train/train_hello_world_model.ipynb