382 views|6 replies

18

Posts

0

Resources
The OP
 

"Deep Learning" Reading Notes 1: Application Knowledge Points of Deep Learning on Microcontrollers [Copy link]

This time, I was fortunate to apply for the book "Deep Learning" and read it for three weeks. Since I used to use single-chip microcomputers for development, I hope to acquire some relevant knowledge about machine learning on single-chip microcomputers. The book's description of deep learning content is vivid and uses many examples close to life, allowing people to intuitively feel the principles of deep learning. Through reading and consulting materials, I hope to share with you some of the gains I have made on the issues I am concerned about. The first is the solution to the acquisition of data sets in machine learning. Usually we need a certain amount of data to complete the training, and before that we usually need to manually generate data sets to meet usage needs. Through learning and consulting, I also learned the following acquisition methods:

Public datasets : Many research institutions and universities release some standard public datasets, which are usually cleaned and annotated and suitable for academic research and educational purposes. For example, the MNIST dataset is an entry-level dataset for handwritten digit recognition, CIFAR-10 and CIFAR-100 are commonly used image recognition datasets, ImageNet is a large-scale image recognition dataset, and Pascal VOC is often used for object detection and image segmentation tasks.

Web crawler : You can crawl data from the Internet by writing a web crawler program. This method can obtain a large amount of data, but it is necessary to deal with the uncertainty and quality of the data.

Data platforms : Some data platforms such as Kaggle, Google Dataset Search, AWS Public Datasets, etc. provide a large number of data sets covering various fields and applications.

When developing a project, there are some cases where you need to deploy a machine learning model on the microcontroller, and STM32Cube.AI is usually used for model conversion and code generation. When I use a microcontroller for machine learning, I also understand some things that need to be paid attention to to optimize performance, such as the following ways: Use bit operations instead of arithmetic operations : Bit operations are usually faster than arithmetic operations, such as using bitwise AND, bitwise OR, bitwise XOR and other operations to process flag bits, or using shift operations instead of multiplication and division. Avoid unnecessary operations : Remove unnecessary variable assignments and function calls in the code to reduce program complexity and execution time. Control data type size : Try to use smaller data types, such as charor int, instead of float, because floating-point operations usually require more CPU cycles and memory space. Utilize hardware resources : For example, use DMA (direct memory access) to transfer data to reduce CPU load, or use the microcontroller's hardware accelerator (if it exists) to perform specific tasks. Self-increment and self-decrement instructions : Use self-increment and self-decrement operations such i++as i--and, because some compilers optimize these operations and are more efficient. Optimize algorithms : Select or design algorithms that are suitable for the resource limitations of the microcontroller, such as using simple linear regression instead of complex neural network models. Code reuse : Reuse code through functions or macros to reduce code redundancy and improve code maintainability. Register optimization : Store frequently used variables in registers to speed up access. Instruction pipeline optimization : By organizing the code reasonably, instructions can be executed in parallel to improve execution efficiency. Memory optimization : Optimize data structures and memory usage, reduce memory fragmentation, and increase memory access speed. Interrupt optimization : Reasonably configure interrupts, reduce the complexity of interrupt handlers, and ensure that interrupt service routines are as short as possible. Model optimization : During the model training stage, the model size can be reduced through model compression, quantization and other technologies to make it more suitable for running on a microcontroller.

I wonder if any of my colleagues have rich experience in using microcontrollers to deploy machine learning models. I hope we can communicate and learn from each other, as I am still relatively unfamiliar with this area.

This post is from stm32/stm8

Latest reply

Thanks for sharing! Thanks for sharing! Thanks for sharing! Thanks for sharing! Thanks for sharing!   Details Published on 2024-9-20 14:41
 

44

Posts

2

Resources
2
 

Thanks for sharing! Thanks for sharing! Thanks for sharing! Thanks for sharing! Thanks for sharing! Thanks for sharing! Thanks for sharing!

This post is from stm32/stm8
 
 

6788

Posts

2

Resources
3
 

This road is still very long, and it is a good idea to start by reading a book.

This post is from stm32/stm8
 
 

193

Posts

1

Resources
4
 

This road is very wide, you really need to determine the scope before walking, otherwise you will go astray.

This post is from stm32/stm8
 
 
 

104

Posts

0

Resources
5
 

It looks difficult! I'll just give up.

This post is from stm32/stm8
 
 
 

62

Posts

0

Resources
6
 

Thanks for sharing! Thanks for sharing! Thanks for sharing!

This post is from stm32/stm8
 
 
 

44

Posts

2

Resources
7
 

Thanks for sharing! Thanks for sharing! Thanks for sharing! Thanks for sharing! Thanks for sharing!

This post is from stm32/stm8
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Featured Posts
C51 programming of real-time clock chip DS1302

C51 programming of real-time clock chip DS1302 is divided into 8 parts

Analog Circuit Basics Tutorial! E-book

Recommended ★★★★★ Data Type E-books Document language Simplified Chinese

Self-study experience of single chip microcomputer

Whether you are an amateur electronics enthusiast or a practitioner in the electronics industry, mastering microcontroll ...

Some experience summary on AD conversion design

I saw a blog post about the basic issues in AD conversion design, so I reposted it here to share with you. Understanding ...

Senior programmer talks: My opinion on the reliability design of embedded C language

Senior programmer talks: My opinion on the reliability design of embedded C language Preface The reliability of equipm ...

ALLEGRO PROBLEMS

491674 How should the Allegro routing be adjusted? It doesn't seem as convenient as AD. Is there any good way to adjust ...

Moderator Work Rewards for July 2021

The list of moderators who received the July 2021 work rewards is as follows: username Post Reply Featured Rat ...

What does RF and FC mean in radio frequency cards?

I would like to ask what RF and FC involved in radio frequency cards mean, as shown in the figure below, and what does / ...

Please tell me why this machine often burns the starting resistor at the customer's place

Please tell me why the resistor burned out and how to fix it? 627875627874627873

【Digi-Jet Follow me Issue 4】Project Summary

75a4b91c996f6d1fd951a4b0b5082c81 Preface I didn't receive any email after registering for the fourth phase. I felt that ...

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list