Supplier eBooks

STMicroelectronics - Intelligence at the Edge

Issue link: https://resources.mouser.com/i/1481902

Contents of this Issue

Navigation

Page 24 of 33

STMicroelectronics 2022 25 which will depend on the task at hand, as well as the engineer's familiarity with the tool. For instance, is the task simple anomaly detection or multi-class classification? Does it involve image processing, or is it just acquired accelerometer data? Is the engineer more comfortable with TensorFlow or PyTorch? For embedded ML, the most widely used frameworks are Keras, TensorFlow Lite, PyTorch, and scikit-learn. There is also an open file format standard called "Open Neural Network Exchange (ONNX)" that enables developers to convert AI models between different frameworks. Another important concept is "quantization." In short, quantization is the process of converting 32-bit floating point data to a lower bit width like an 8-bit integer to reduce the memory requirement and computational cost. There are two forms of quantization: Post-training quantization and quantization-aware training. The post- training quantization, as the name suggests, is performed after the model is trained. It is commonly used because it is easier to implement. On the other hand, quantization-aware training, which is performed during the training process, requires more work but yields higher model accuracy. In addition to the popular 8-bit quantization, new techniques like "deep quantization" quantize certain layers in a model to 4-bit, 2-bit, or even 1-bit widths, where the 1-bit model can also be called a "binarized neural network". For example, a model can be binarized with QKeras by Google, a quantization extension to Keras that provides drop-in replacements for some of the Keras layers. Figure 2: STM32Cube.AI (X-CUBE-AI) (Source: STMicroelectronics) With a pre-trained NN model in hand, the next development step is converting the model into executable C code. There are various tools in the market that can do this job. Some of them only perform the conversion, while others offer integrated features such as data collection and labeling and/or the MCU support of specific or multiple vendors. STM32Cube.AI (X-CUBE-AI) (Figure 2) is the official ST toolkit that allows developers to port and optimize their own neural networks on the entire STM32 portfolio. It is capable of automatically converting pre-trained AI algorithms, including NN and classical ML algorithms, and integrating the generated optimized model libraries into users' projects. " ST's primary objective has been achieving favorable AI/ML performance with limited device resources and developer AI know-how.

Articles in this issue

Links on this page

view archives of Supplier eBooks - STMicroelectronics - Intelligence at the Edge