An Embedding Workflow for Tiny Neural Networks on Arm Cortex-M0(+) Cores
Jianyu Zhao, Cecilia Carbonelli, Wolfgang Furtner · River Publishers eBooks · 2023
Neural networks are becoming increasingly widely used in alwayson IoT edge devices for more precise and secure data analysis with less latency. However, due to the strict cost and power constraints for such applications, only the smallest microcontrollers, typically equipped with Arm Cortex-M0(+) cores, could be used for algorithm implementation. For a memory of only a few tens of kilobytes, the available opensource embedding tools either are too large or require too much handcraft effort. In this paper, we propose an end-to-end embedding workflow focused on tiny neural network deployment on Arm Cortex-M0(+) cores. The method covers all the steps, including network quantisation, C code generation and performance verification. A Python and C library was developed following the proposed method and validated on a low-cost environmental sensing application. As a result, up to 73.9% of the memory footprint could be reduced with the quantised network with only a small sacrifice in performance. While reducing the manual effort of network embedding to the minimum, the workflow remains flexible enough to allow for customisable bit shifts and different layer combinations.