This project is base on AAML_MCU_TinyML_Lab
- import
train_with_cifar10.ipynb
on colab - run the code and it will start training
- after training , download
resnet_v1_eembc.tflite
&resnet_v1_eembc_quant.tflite
- import
Lab1_2_3/basic_compile.ipynb
(basic) orLab3_4/cmsis_compile.ipynb
(cmsis) - upload the model (cmsis can only run with quant model)
- modify the
model_path = ""
to your model path - run the code and it will compile the project
- after compile , download the .bin file
- connect the F767ZI with your computer
- download termite
- open termite & set the baod rate
115200
- copy the .bin file into F767ZI
- see the output in termite
NUCLEO_F767ZI | TFLM | TFLM + int8 Quant | TFLM + int8 Quant + cmsis |
---|---|---|---|
Time(us) | 4,634,854 | 4,672,161 | 437,600 |
Arena Size(bytes) | 201,696 | 54,452 | 55,108 |
DISCO_F746NG | TFLM | TFLM + int8 Quant | TFLM + int8 Quant + cmsis |
---|---|---|---|
Time(us) | 4,625,590 | 5,747,635 | 428,668 |
Arena Size(bytes) | 201,696 | 54,452 | 55,108 |
- change the model architecture (add / remove some layer) in
train_with_cifar10.ipynb
- compare the new model's(add/remove)
Inference Time
,Arena size
,Model size
with origin one in non-quant / quant / quant + CMSIS condition
Method | Time(us) | Model size | Arena Size |
---|---|---|---|
remove layer float | - | - | - |
remove layer quant | - | - | - |
remove layer quant + CMSIS | - | - | - |
origin float | - | - | - |
origin quant | - | - | - |
origin quant + CMSIS | - | - | - |
add layer float | - | - | - |
add layer quant | - | - | - |
add layer quant + CMSIS | - | - | - |
Method | Time(us) | Model size | Arena Size |
---|---|---|---|
float | - | - | - |
quant | - | - | - |
quant + CMSIS | - | - | - |